v1

latestOpenAPI 3.0.32026-07-1760076.2 KB
documents

Retrieve parts of a document transformed via ODD

Retrieve a document fragment, usually a division or page, transformed to HTML via the ODD. This operation is internally used by pb-view, but can also be helpful with pb-load or in other contexts.

get/api/parts/{doc}/{format}

Path parameters

docstring required

path to the document, relative to TEI Publisher's data root colletion

format'json' | 'html' required

the format to return: either json or html. The first returns the HTML inside a JSON record with additional information about the next/previous page and so on. The latter is mainly for debugging purposes.

Query parameters

oddstring
Example:shakespeare.odd
view'page' | 'div' | 'single'

the view to use: this determines the size of the fragment returned, i.e. just a page, a whole division or the entire document

rootstring

an eXist node id used to identify the root of the fragment to return. mainly used to navigate to the next/previous fragment based on the properties received in the JSON record during a preceding request.

idstring

an xml:id to load: can be used instead of root to determine the fragment root to be loaded. Should be an xml:id existing in the document.

xpathstring

an XPath expression to directly select a sub-part of the document, e.g. the TEI body, front or back matter, or teiHeader. Usually only makes sense in combination with view=single.

mapstring

defines an optional mapping function (written in XQuery), which can be used to replace the document content to be processed with something else. Used to e.g. look up the translation for a given transcription and process it instead.

highlightstring
serialize'xml' | 'html5'

should HTML content be rendered as HTML5 or XML?

wrapboolean

should returned HTML be wrapped into a div?

Headers

If-Modified-Sincestring

Response

OK

viewstring

the view type used

docstring

path to the document from which the fragment was retrieved

rootstring nullable
oddstring

the ODD used for the transformation

nextstring nullable

points to the next fragment in the document. Pass this value as root in a follow up request.

previousstring nullable

points to the previous fragment in the document. Pass this value as root in a follow up request.

switchViewstring nullable
contentstring

the content of the fragment as HTML string

footnotesstring nullable