| 1 | = tickets/{ticket}/{lang}/{textId}/{pageName} = |
| 2 | |
| 3 | == GET == |
| 4 | |
| 5 | ===XML === |
| 6 | {{{ |
| 7 | <xml> |
| 8 | <line>OCR_LINE_STRING</line> |
| 9 | <line>...</line> |
| 10 | </xml> |
| 11 | }}} |
| 12 | |
| 13 | wobei in OCR_LINE_STRING jeweils den Treffer in einer Zeile beschreibt, der String has das Format |
| 14 | |
| 15 | {{{ |
| 16 | ZEILENNUMMER|BOUNDING_BOX|PAGE_DIMENSIONS |
| 17 | }}} |
| 18 | |
| 19 | z.B. |
| 20 | |
| 21 | {{{ |
| 22 | 18|306 707 1033 741|2250 1593 |
| 23 | }}} |
| 24 | |
| 25 | |
| 26 | === HTML === |
| 27 | Transformation des XML mit dem folgenden xsl: |
| 28 | {{{ |
| 29 | <?xml version="1.0" encoding="UTF-8"?> |
| 30 | <xsl:stylesheet version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://dublincore.org/documents/dcmi-namespace/"> |
| 31 | <xsl:output method="html"></xsl:output> |
| 32 | <xsl:template match="/"> |
| 33 | |
| 34 | <xsl:for-each select="//hitsOnPage"> |
| 35 | <div class="foundPage"> |
| 36 | <a><xsl:attribute name="href"><xsl:value-of select="./@xlink:href"/></xsl:attribute> |
| 37 | <xsl:value-of select="//pageFileName"/></a></div> |
| 38 | </xsl:for-each> |
| 39 | </xsl:template> |
| 40 | </xsl:stylesheet> |
| 41 | }}} |