Hi Thomas and Andrew,<div><br></div><div>I usually don't build TEI, since you can use --xsl=../Stylesheet to simply point to the XSLTs in the svn trunk.</div><div>For saxon, I also avoid packages and get the latest version from the saxon website (usually I use the home edition). I write a shell script like this:</div>
<div><br></div><div>java -jar saxon(version).jar $*</div><div><br></div><div>and link to it from /usr/bin/saxon</div><div><br></div><div>I think saxonb-xslt may be the problem here, so try to get saxon9HE from their website instead.</div>
<div><br></div><div>Best,</div><div>Raffaele<br><br><div class="gmail_quote">On Sat, Dec 3, 2011 at 10:24 PM, Andrew Hankinson, Mr <span dir="ltr"><<a href="mailto:andrew.hankinson@mail.mcgill.ca">andrew.hankinson@mail.mcgill.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Thomas,<br>
<br>
I usually follow these instructions:<br>
<br>
<a href="http://www.wwp.brown.edu/outreach/seminars/_current/handouts/roma_CLI_MacOS_X.html" target="_blank">http://www.wwp.brown.edu/outreach/seminars/_current/handouts/roma_CLI_MacOS_X.html</a><br>
<br>
They say they're for OS X, but I don't see any real reason why they can't be used for Ubuntu too.<br>
<br>
There are a couple caveats, though:<br>
<br>
-- The Makefile for tei-roma is a bit weird for use on OSX, so it may also be for Ubuntu too if you want to store everything in /usr/local. I filed a bug about it*, but it still does weird things. If you want to keep the Roma configuration stuff in /usr/local/etc (instead of /etc) you will have to edit it. I can send more details about this if you like.<br>
<br>
-- You may also have to reverse the order for the "Roma itself" and "Build TEI P5" steps. If you don't do the Build TEI P5 step first, the p5subset.xml file will not exist in your odd/ directory, and the roma build script will fail when it tests for it. If you do the `make oddschema` step first, though, it should produce one. Be careful, though -- if the process fails it will likely produce a file, but it will be empty. On my machine, a compiled p5subset.xml file is about 3.3MB.<br>
<br>
I usually then alias the roma command in the shell like this (put this in .bashrc or .zshrc):<br>
<br>
<br>
export MEI_LOCATION="/path/to/svn/mei/trunk/source/driver.xml"<br>
export TEI_STYLESHEETS="/usr/local/share/xml/tei/stylesheet"<br>
<br>
alias mei="/usr/local/bin/roma --localsource=$MEI_LOCATION --xsl=$TEI_STYLESHEETS --nodtd --noxsd $*"<br>
<br>
<br>
Then I can just pass the customization in on the command line, e.g.,:<br>
<br>
$> mei mei-all.xml<br>
<br>
and it will create a "RomaResults" directory in the current working directory with the RNG file. (You should also be able to pass in an output directory if you don't want to put it in the CWD, e.g., mei mei-all.xml [outputdir])<br>
<br>
Hope this helps!<br>
-Andrew<br>
<br>
* <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=3304677&group_id=106328&atid=644062" target="_blank">http://sourceforge.net/tracker/index.php?func=detail&aid=3304677&group_id=106328&atid=644062</a><br>
<div class="im HOEnZb"><br>
On 2011-12-03, at 6:20 AM, TW wrote:<br>
<br>
> Hi Raffaele,<br>
><br>
> 2011/12/2 Raffaele Viglianti <<a href="mailto:raffaeleviglianti@gmail.com">raffaeleviglianti@gmail.com</a>>:<br>
</div><div class="im HOEnZb">>> If I understand your problem correctly, you should create an ODD<br>
>> customization. Look at /MEI_dev/customizations/mei-all.xml as an example.<br>
>> That file selects all the modules. You can make a copy and comment out the<br>
>> modules that you want to exclude.<br>
>><br>
>> At this point you have a few options to generate an RNG and XSD from the<br>
>> source + customization. This is what I usually do on a Unix system:<br>
>><br>
>> 1. checkout TEI's trunk from sourceforge if you don't have it already<br>
>> 2. make sure you have all the dependecies (trang, saxon, xmllint)<br>
>> 3. go to /Roma<br>
>> 4. run the command:<br>
>><br>
>> ./roma2 --xsl=../Stylesheets --localsource=fullPathTo_mei-2011-05-source.xml<br>
>> fullPathToYourCustomization<br>
>><br>
>> 5. Under RomaResults you'll find the resulting RNG and XSD.<br>
>><br>
><br>
</div><div class="HOEnZb"><div class="h5">> I need some more assistance.<br>
><br>
> Problem 1: /trunk/Roma/roma2.sh relies on command "saxon". On my<br>
> Ubuntu Natty system I have the packages libsaxon-java, libsaxonb-java<br>
> and libsaxon-java-gcj installed, but they don't come with this<br>
> command. So I changed "saxon" to "saxonb-xslt". But then I get<br>
><br>
> Error at xsl:result-document on line 1851 of<br>
> file:/home/tom/tei/trunk/Stylesheets/odds2/teiodds.xsl:<br>
> xsl:result-document is disabled when extension functions are disabled<br>
><br>
> So I inserted -ext:on, which *seemed* to get me somewhere (after I<br>
> created some directory that Roma wanted to put the results).<br>
><br>
> Problem 2: I did the following, using the unmodified mei-all.xml for testing:<br>
><br>
><br>
> tom@desktop:~$ tei/trunk/Roma/roma2.sh --xsl=tei/trunk/Stylesheets<br>
> --localsource=music-encoding/trunk/source/specs/mei-2011-05-source.xml<br>
> music-encoding/trunk/customizations/mei-all.xml<br>
> ========= Roma starts at 2011-12-03 12:05:09 ===========<br>
> TEI stylesheet tree: tei/trunk/Stylesheets<br>
> Results to: RomaResults<br>
> Process music-encoding/trunk/customizations/mei-all.xml to create<br>
> mei{.dtd|.xsd|.doc.xml|.rng|.rnc} in RomaResults<br>
> ========= Roma version VVVERSION starts execution at 2011-12-03<br>
> 12:05:10.208637972 ===========<br>
> using /home/tom/music-encoding/trunk/source/specs/mei-2011-05-source.xml<br>
> as default source<br>
> 1. expand and simplify ODD<br>
> 2. make RELAX NG from compiled ODD<br>
> 3. make RELAX NG compact from XML<br>
> 4. make XSD from RELAX NG<br>
> /home/tom/RomaResults/mei.rng:11:13: error: restriction violation:<br>
> "start" contains "empty"<br>
><br>
><br>
> ERROR: trang fails.<br>
> This was a fatal error. 2011-12-03 12:05:14<br>
> 5. make DTD from compiled ODD<br>
> ========= 2011-12-03 12:05:<a href="tel:16.785145931" value="+16785145931">16.785145931</a> Roma ends<br>
><br>
><br>
> The generated RNG looks like:<br>
><br>
><br>
> <?xml version="1.0" encoding="utf-8"?><br>
> <grammar xmlns="<a href="http://relaxng.org/ns/structure/1.0" target="_blank">http://relaxng.org/ns/structure/1.0</a>"<br>
> xmlns:xlink="<a href="http://www.w3.org/1999/xlink" target="_blank">http://www.w3.org/1999/xlink</a>"<br>
> datatypeLibrary="<a href="http://www.w3.org/2001/XMLSchema-datatypes" target="_blank">http://www.w3.org/2001/XMLSchema-datatypes</a>"<br>
> ns="<a href="http://www.music-encoding.org/ns/mei" target="_blank">http://www.music-encoding.org/ns/mei</a>"><br>
> <!--<br>
> Schema generated from ODD source 2011-12-03T12:05:14Z.<br>
> Edition:<br>
> Edition Location: <a href="http://www.tei-c.org/Vault/P5//" target="_blank">http://www.tei-c.org/Vault/P5//</a><br>
><br>
> --><br>
> <!----><br>
> <start><br>
> <empty/><br>
> </start><br>
> </grammar><br>
><br>
><br>
> Something tells me this is flawed.<br>
><br>
> I saw there are Debian packages available[1] and added them to my<br>
> software sources. I installed the packages tei-roma, saxon and<br>
> tei-p5-xsl2. The result was pretty much the same:<br>
><br>
><br>
> tom@desktop:~/music-encoding/trunk/customizations$ roma mei-all.xml mei-all<br>
> ========= Roma starts at 2011-12-03 12:13:48 ===========<br>
> TEI stylesheet tree: /usr/share/xml/tei/stylesheet<br>
> Results to: mei-all<br>
> Process mei-all.xml to create mei{.dtd|.xsd|.doc.xml|.rng|.rnc} in mei-all<br>
> ========= Roma version 4.7 starts execution at 2011-12-03<br>
> 12:13:49.646907172 ===========<br>
> 1. expand and simplify ODD<br>
> 2. make RELAX NG from compiled ODD<br>
> 3. make RELAX NG compact from XML<br>
> 4. make XSD from RELAX NG<br>
> /home/tom/music-encoding/trunk/customizations/mei-all/mei.rng:11:13:<br>
> error: restriction violation: "start" contains "empty"<br>
><br>
><br>
> ERROR: trang fails.<br>
> This was a fatal error. 2011-12-03 12:14:00<br>
> 5. make DTD from compiled ODD<br>
> ========= 2011-12-03 12:14:03.531732571 Roma ends<br>
><br>
><br>
> What can I do?<br>
><br>
> Thanks!<br>
> Thomas<br>
><br>
><br>
> [1] <a href="http://tei.oucs.ox.ac.uk/teideb/" target="_blank">http://tei.oucs.ox.ac.uk/teideb/</a><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> mei-l mailing list<br>
> <a href="mailto:mei-l@lists.uni-paderborn.de">mei-l@lists.uni-paderborn.de</a><br>
> <a href="https://lists.uni-paderborn.de/mailman/listinfo/mei-l" target="_blank">https://lists.uni-paderborn.de/mailman/listinfo/mei-l</a><br>
<br>
<br>
_______________________________________________<br>
mei-l mailing list<br>
<a href="mailto:mei-l@lists.uni-paderborn.de">mei-l@lists.uni-paderborn.de</a><br>
<a href="https://lists.uni-paderborn.de/mailman/listinfo/mei-l" target="_blank">https://lists.uni-paderborn.de/mailman/listinfo/mei-l</a><br>
</div></div></blockquote></div><br></div>