-
Notifications
You must be signed in to change notification settings - Fork 1
Description
:We could implement a group of endpoints that would support the documentation of DraCor corpora:
You provide an element name an the endpoint returns (random) examples from all plays in all corpora in the eXist-DB.
/api/v1/encoding-examples?element=idno
/api/v1/...?attribute=type
Should return TEI-XML in this example namespace: http://www.tei-c.org/ns/Examples
<egXML xmlns="http://www.tei-c.org/ns/Examples">
<author>
<persName>
<forename>Gotthold</forename>
<forename>Ephraim</forename>
<surname>Lessing</surname>
</persName>
<idno type="wikidata">Q34628</idno>
<idno type="pnd">118572121</idno>
</author>
</egXML>
We would need a root element to have a valid XML document and could use , have a minimal and include the examples in the . I wouldn't mind if the returned TEI would not validate against tei-all though; or, we wrap it in a custom element
<examples xml:ns="https://dracor.org/api/v1/examples">
</examples>
Maybe one could also wrap in .
I like the DraCor <examples> best.
Optional: provide the DTS Navigation/Document endpoint URI as source of the example to foster navigation an exploring of the context of the example in the given TEI document