iiif_stuff

ALTO to Annotation list

This XSLT converts an ALTO xml document to an annotation lists for use with a IIIF manifests. To link to an annotation list from a manifest add the following in the related canvas:

"otherContent": [
    {
        "@id": "http://dams.llgc.org.uk/iiif/2066058/annotation/list.json",
        "@type": "sc:AnnotationList"
    }
]

Note this XSLT produces word level annotations. If you prefer line level annotations see the comment in the XSLT.

The required parameters are:

You can also optionally supply:

To run this from the command line you can run:

xsltproc --stringparam annoURI "http://localhost:8887/altoAnnotations.json" --stringparam xRatio 1 --stringparam yRatio 1  --stringparam canvasURI "http://07ae9a4f-5e65-4ecd-9796-7f682e7e0b37" annotationListNoArt.xsl /Users/gmr/Downloads/CAVA_TS_1371_5097_0008_002_alto.xml > altoAnnotations.json