85 | | == HTML Results == |
---|
| 87 | == Custom/XHTML Results == |
---|
| 88 | Some search engines may provide non-standard set of results which can't be represented using default XML scheme. In this case the arbitrary XHTML content is returned within the ''Content'' tag inside a module results. |
---|
| 89 | Example: |
---|
| 90 | <result> |
---|
| 91 | <module name="proxy"> |
---|
| 92 | <Content> |
---|
| 93 | ... arbitrary XHTML content is here ... |
---|
| 94 | </Content> |
---|
| 95 | </module> |
---|
| 96 | </result> |
---|
| 97 | |
---|
| 98 | The best example here is ''proxy'' search module which downloads XML document from the specified location and applying XSLT stylesheet to convert it into the XHTML. For example, the following request: |
---|
| 99 | {{{ |
---|
| 100 | ipepdvadei.ka.fzk.de/adei/services/search.php?search={proxy(xml=katrin.php?target=runs;xslt=katrinsearch;noprops)}%20interval:1218431322-1253472677 |
---|
| 101 | }}} |
---|
| 102 | obtains the data from ''katrin.php'' service, applies the ''katrinsearch'' stylesheet to it and returns the resulting HTML. |
---|
| 103 | |
---|
| 104 | The parameters of proxy module specifies: |
---|
| 105 | * ''xml'' - the service to obtain XML document from |
---|
| 106 | * ''xslt'' - the stylesheet to apply to XML, could be omitted if service returns XHTML |
---|
| 107 | * ''noprops'' - instructs ADEI to not add current properties when calling the service, otherwise the passsed ''db_server'', ''db_name'', and other properties would be added in the end of service request. |
---|
| 108 | |
---|
| 109 | The two properties are passed to the ''katrin.php'' service: |
---|
| 110 | * ''target'' - it is specified directly within proxy module options (target=runs) |
---|
| 111 | * ''window'' - it is specified in search limits at the end of search string (interval:1218431322-1253472677) |
---|
| 112 | |
---|
| 113 | The example of HTML returned: |
---|
| 114 | {{{ |
---|
| 115 | <result> |
---|
| 116 | <module name="proxy"> |
---|
| 117 | <Content> |
---|
| 118 | <div> |
---|
| 119 | <h4>Found runs:</h4> |
---|
| 120 | <p> |
---|
| 121 | <a href="javascript:katrin.SetCustomProperties('run=kps00000464')">Run kps00000464</a><br/> |
---|
| 122 | 2008-09-10 11:49:50 - 2008-09-10 11:52:52<br/> |
---|
| 123 | <a href="javascript:katrin.SetCustomProperties('run=kps00000464.00001')">Subrun kps00000464.00001</a><br/> |
---|
| 124 | ... |
---|
| 125 | </Content> |
---|
| 126 | </module> |
---|
| 127 | </result> |
---|
| 128 | }}} |