HTML export ----------- Transforms TEI based content to (X)HTML. This is quite fast, it is used for the text representations on . Synopsis:: /html/{object}?stylesheet&pi&refreshStylesheet&sid&embedded&css&linkPattern&mediatype&id&simulate resource-wide template parameters +--------------------------+--------------------------+--------------------------+ | parameter | value | description | +==========================+==========================+==========================+ | **object** | string | The TextGrid URIs of the | | | | TEI document(s) or | | | | aggregation(s) to | | | | transform, separated by | | | | commas | +--------------------------+--------------------------+--------------------------+ Customizing output to suit your web application ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ By default, we'll deliver a standalone XHTML document. However, you'll often want to embed the aggregator's output in your web application. The following options will help you with that: +--------------------------+--------------------------+--------------------------+ | parameter | value | description | +==========================+==========================+==========================+ | **embedded** | boolean | If true, an HTML | | | | fragment consisting of a | | | |
| | | | element containing the | | | | contents of the HTML | | | | will be returned, | | | | ready to be embedded in | | | | an existing HTML page | +--------------------------+--------------------------+--------------------------+ | **css** | *` <>`__* | URL of the CSS that | | | | should be referenced in | | | | the HTML that is created | +--------------------------+--------------------------+--------------------------+ | **linkPattern** | string | URL pattern for links. | | | | @URI@ will be replaced | | | | with the textgrid: URI. | +--------------------------+--------------------------+--------------------------+ | **mediatype** | string | The requested content | | | | type. E.g., text/html or | | | | text/xml | +--------------------------+--------------------------+--------------------------+ | **id** | string | An XML ID. If given, | | | | only this element will | | | | be transformed. | +--------------------------+--------------------------+--------------------------+ | **simulate** | boolean | If true, a full webpage | | | | that looks similar to | | | | textgridrep.de's browse | | | | view will be returned | | | Default: ``false`` | | +--------------------------+--------------------------+--------------------------+ Links and graphics in the transformed text ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TEI documents in TextGrid will often contain links using TextGrid URIs. As these are not resolved by browsers, the aggregator will try to rewrite links in a way that is useful. When using the HTML transformation for display embedded in a web application, you'll want to pass in a *linkPattern* query parameter. That is an URL to a page of your web page that will display the HTML view of the document with the given TextGrid URI. E.g., on we use calls like the following: https://textgridlab.org/1.0/aggregator/html/textgrid:vqmz.0?embedded=true&mediatype=text/xml&linkPattern=browse.html%3Fid%3D%40URI%40%26fragment%3D%40ID%40 (The decoded value of the linkPattern is ``browse.html?id=@URI@&fragment=@ID@``) The default stylesheet will use this by rewriting a link target like ``textgrid:4711#someid`` to ``browse.html?id=textgrid:4711&fragment=someid``. Embedded graphics using textgrid: URIs will currently be rewritten to directly refer to a TG-crud URI. Custom style in TEI files ^^^^^^^^^^^^^^^^^^^^^^^^^ There are some ways to specify how something is rendered. Although all this actually describes how stuff is rendered in the transcribed original, the HTML transformations will try to make use of this for the output. With the default stylesheets, users can expect the following: * values of TEI ``rend`` attributes will be included in the HTML ``class`` attribute literally. In the CSS used on textgridrep.de, we have a few rules for common stuff like ``italic`` or ``spaced``. * values of TEI ``style`` attributes are expected to be CSS and are literally copied to HTML ``style`` attributes. * You can use TEI's ``rendition`` mechanism to formally specify custom styling for your document. See `Feature Request #2 `_, and especially the files attached there, for an example on how this can be used in your TEI document. This stuff, and also some built-in rules to deal with, e.g., run-in headers, creates custom ``