EpiDoc Converter API

Using EpiDoc Converter Version 1.5

EpiDoc Data


Your input data seems not to be valid XML or could not be checked (check) properly.

Parameters

?
The saxon-converter uses the Saxon/C XSLT-processor to convert the EpiDoc-XML into HTML ("render") using the official EpiDoc Example Stylsheets.

The libxml-converter uses libxml and PHP to render your EpiDoc against some simplified stylesheets.
It only renders the <edition>-part of the EpiDoc right now, and is not prepared to the full band of syntactic and epigraphic special cases like the official stylesheets but in most cases it gets the job done.



apparatus-style ?
supported values are 'default' (generate apparatus from tei:div[@type='apparatus']) and 'ddbdp' (generate apparatus from tei:app, tei:subst, tei:choice, tei:hi etc. elements in the text)
edition-type ?
diplomatic' prints edition in uppercase, no restored, corrected, expanded characters, etc.)
edn-structure
leiden-style ?
These change minor variations in local Leiden usage; brackets for corrected text, display of previously read text, illegible characters, etc.
line-inc ?
Show line number every ... line.
topNav
verse-lines ?
when a text of section of text is tagged using and elements [instead of ] then edition is formatted and numbered in verse lines rather than epigraphic lines
Add
Render!
Report a bug

Query

Response

 

Use the API

  • API endpoint https://epidoc.dainst.org/
  • What is this?
    EpiDoc is a is an international, collaborative effort that provides guidelines and tools for encoding scholarly and educational editions of ancient documents such as inscriptions, papyri and more.
    EpiDoc uses a subset of the TEI's standard for the representation of texts in digital form. Being a XML-Format it can be transformed in HTML to be displayed in hompages with XSTL-Stylesheets wich is easy in theory but complicate in praxis as the EpiDoc-Format it quite complex.
    The epidocConverter is a PHP-Class wich can be included in your projects software and be used to convert EpiDoc-Data easily into HTML. Even easier you can use it via epidoc.dainst.org remotely from your project.
  • How to use

    A simple example: To transform this

    <?xml version="1.0" encoding="UTF-8"?> <TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en"> <text> <body> <div type="edition" xml:space="preserve" xml:lang="grc"> <ab><del rend="erasure">Καιρός</del></ab> </div> </body> </text> </TEI>

    into that HTML

    <div id="edition" lang="grc"> <div class="textpart">⟦Καιρός⟧</div> </div>

    wich looks like that

    ⟦Καιρός⟧

    You just call the API like this:

    curl --data "data=<?xml version=\"1.0\" encoding=\"UTF-8\"?> <TEI xmlns=\"http://www.tei-c.org/ns/1.0\" xml:lang=\"en\"> <text> <body> <div type=\"edition\" xml:space=\"preserve\" xml:lang=\"grc\"> <ab><del rend=\"erasure\">Καιρός</del></ab> </div> </body> </text> </TEI>" http://epidoc.dainst.org/

    You can also upload your EpiDoc somewhere and just send the URL:

    curl --data "dataUrl=http://edh-www.adw.uni-heidelberg.de/edh/inschrift/HD000004.xml" http://epidoc.dainst.org/

    GET is also supported:

    http://epidoc.dainst.org/?dataUrl=http://edh-www.adw.uni-heidelberg.de/edh/inschrift/HD000004.xml

    The result is always in JSON format and looks like this:

    { "success": true, "data": "<div id=\"edition\" lang=\"grc\"> <div class=\"textpart\">\u27e6\u039a\u03b1\u03b9\u03c1\u03cc\u03c2\u27e7<\/div> <\/div>", "mode": "saxon", "query": [], "css": "http:\/\/epidoc.dainst.org\/xsl\/global.css" }
  • API Parameter
    data Your EpiDoc data.
    dataUrl An URL to your EpiDoc file. Use only this or data.
    mode Wich renderer should be used? Can be saxon or libxml, saxon is default.
    returnAll If provided, the API returns a full HTML site. If not, you get a <div>-element and a link to CSS-Information separately.
    returnSource If provided, the API returns also the EpidDoc itself.
    {XSLT parameter} If in saxon mode the API alos accepts also most of the parameters the EpiDoc Stylesheets kno like apparatus-style, edition-type etc.

Get in contact

Get the EpiDocConverter PHP class sourcecode

Get more Information

Licence & Copyright

  • EpidocConverter:
  • Copyright (C) 2015, 2016 Deutsches Archäologisches Institut
  • written by Philipp Franck.
  • GNU General Public License, version 2
    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  • EpiDoc Sample Stylsheets:
  • Copyright (C) by Zaneta Au, Gabriel Bodard and all other contributors.
  • GNU General Public License, Version 3
    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses.