Version 2 (modified by 12 years ago) (diff) | ,
---|
The scholars of the Harriot online project are working with an enhanced version of the ECHO XML schema which allows them to insert commentary and editorial remarks. These markings have in a second step to be converted to the regular ECHO schema. Also, the LaTeX shorthand for math has to be transformed. This whole process is handled mainly by three scripts
- cleanURL.py replaces ampersands in URLs and also removes the
xsi:schemaLocation
from the header - mathml-wrapper.py converts LaTeX math code to mathml.
- adjustHarriot.xsl does the main work in converting the Harriot-specific markup into ECHO-conform elements.
A shell function is quite convenient for dealing with all the scripts in a row (adjust paths to your needs):
harriot() { # echo comment if [[ -r $(echo "$*" | sed s/.xml/-adjusted.xml/ ) ]]; then echo Removing previous conversion file rm -v $(echo "$*" | sed s/.xml/-adjusted.xml/ ) fi echo Correcting urls in "$*" python cleanURL.py $* && echo Checking for wellformed XML xmllint --noout 01_cleanedURL.xml && echo Then math out put && /opt/local/bin/python2.7 /Users/kthoden/eclipse/projects/digitizing-tools/scripts/mathml/mathml-wrapper.py --outputTextFile=02_mathConverted.xml --console=/tmp/console.txt 01_cleanedURL.xml && echo Replacing things in "$*" java -jar /Users/kthoden/XML-ECHO-SVN/trunk/schema/thirdparty/saxonhe9-2-1-1j/saxon9he.jar -xsl:adjustHarriot.xsl -s:02_mathConverted.xml -o:$(echo $*| sed s/.xml/-adjusted.xml/g) && echo Removing temporary files rm -v 01_cleanedURL.xml 02_mathConverted.xml && echo Is it valid? java -jar /Users/kthoden/XML-ECHO-SVN/trunk/schema/thirdparty/jing-20091111/bin/jing.jar -c /Users/kthoden/XML-ECHO-SVN/trunk/schema/schema/echo/echo.rnc $(echo $*| sed s/.xml/-adjusted.xml/g) echo Finished }
The resulting files carry an -adjusted
-infix and will then have to be moved and renamed to trunk/texts/eXist/echo/en (for the time being) to then ingested into the ECHO system.
Additional scripts
html2pt
to be documented
makeIndex
to be documented
menuMaker
to be documented
Attachments (3)
-
using_lodlive.pdf (122.8 KB) - added by 10 years ago.
Using LodLive?
-
harriot_xsd.zip (29.4 KB) - added by 10 years ago.
XSD Schema for Harriot
-
harriot_rnc.zip (32.5 KB) - added by 10 years ago.
RNC Schema for Harriot
Download all attachments as: .zip