[MEI-L] Converting specs to schema
TW
zupftom at googlemail.com
Sat Dec 3 12:20:25 CET 2011
Hi Raffaele,
2011/12/2 Raffaele Viglianti <raffaeleviglianti at gmail.com>:
> If I understand your problem correctly, you should create an ODD
> customization. Look at /MEI_dev/customizations/mei-all.xml as an example.
> That file selects all the modules. You can make a copy and comment out the
> modules that you want to exclude.
>
> At this point you have a few options to generate an RNG and XSD from the
> source + customization. This is what I usually do on a Unix system:
>
> 1. checkout TEI's trunk from sourceforge if you don't have it already
> 2. make sure you have all the dependecies (trang, saxon, xmllint)
> 3. go to /Roma
> 4. run the command:
>
> ./roma2 --xsl=../Stylesheets --localsource=fullPathTo_mei-2011-05-source.xml
> fullPathToYourCustomization
>
> 5. Under RomaResults you'll find the resulting RNG and XSD.
>
I need some more assistance.
Problem 1: /trunk/Roma/roma2.sh relies on command "saxon". On my
Ubuntu Natty system I have the packages libsaxon-java, libsaxonb-java
and libsaxon-java-gcj installed, but they don't come with this
command. So I changed "saxon" to "saxonb-xslt". But then I get
Error at xsl:result-document on line 1851 of
file:/home/tom/tei/trunk/Stylesheets/odds2/teiodds.xsl:
xsl:result-document is disabled when extension functions are disabled
So I inserted -ext:on, which *seemed* to get me somewhere (after I
created some directory that Roma wanted to put the results).
Problem 2: I did the following, using the unmodified mei-all.xml for testing:
tom at desktop:~$ tei/trunk/Roma/roma2.sh --xsl=tei/trunk/Stylesheets
--localsource=music-encoding/trunk/source/specs/mei-2011-05-source.xml
music-encoding/trunk/customizations/mei-all.xml
========= Roma starts at 2011-12-03 12:05:09 ===========
TEI stylesheet tree: tei/trunk/Stylesheets
Results to: RomaResults
Process music-encoding/trunk/customizations/mei-all.xml to create
mei{.dtd|.xsd|.doc.xml|.rng|.rnc} in RomaResults
========= Roma version VVVERSION starts execution at 2011-12-03
12:05:10.208637972 ===========
using /home/tom/music-encoding/trunk/source/specs/mei-2011-05-source.xml
as default source
1. expand and simplify ODD
2. make RELAX NG from compiled ODD
3. make RELAX NG compact from XML
4. make XSD from RELAX NG
/home/tom/RomaResults/mei.rng:11:13: error: restriction violation:
"start" contains "empty"
ERROR: trang fails.
This was a fatal error. 2011-12-03 12:05:14
5. make DTD from compiled ODD
========= 2011-12-03 12:05:16.785145931 Roma ends
The generated RNG looks like:
<?xml version="1.0" encoding="utf-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.music-encoding.org/ns/mei">
<!--
Schema generated from ODD source 2011-12-03T12:05:14Z.
Edition:
Edition Location: http://www.tei-c.org/Vault/P5//
-->
<!---->
<start>
<empty/>
</start>
</grammar>
Something tells me this is flawed.
I saw there are Debian packages available[1] and added them to my
software sources. I installed the packages tei-roma, saxon and
tei-p5-xsl2. The result was pretty much the same:
tom at desktop:~/music-encoding/trunk/customizations$ roma mei-all.xml mei-all
========= Roma starts at 2011-12-03 12:13:48 ===========
TEI stylesheet tree: /usr/share/xml/tei/stylesheet
Results to: mei-all
Process mei-all.xml to create mei{.dtd|.xsd|.doc.xml|.rng|.rnc} in mei-all
========= Roma version 4.7 starts execution at 2011-12-03
12:13:49.646907172 ===========
1. expand and simplify ODD
2. make RELAX NG from compiled ODD
3. make RELAX NG compact from XML
4. make XSD from RELAX NG
/home/tom/music-encoding/trunk/customizations/mei-all/mei.rng:11:13:
error: restriction violation: "start" contains "empty"
ERROR: trang fails.
This was a fatal error. 2011-12-03 12:14:00
5. make DTD from compiled ODD
========= 2011-12-03 12:14:03.531732571 Roma ends
What can I do?
Thanks!
Thomas
[1] http://tei.oucs.ox.ac.uk/teideb/
More information about the mei-l
mailing list