[tei-council] Build failed in Jenkins: TEIP5-Test #238

Martin Holmes mholmes at uvic.ca
Thu Apr 21 14:56:33 EDT 2011


Hi Sebastian (or anyone else who can help),

My latest source change just generated an error in P5-Test.

I made a single change to the source, adding <distributor> to 
model.respLike in distributor.xml. I did run a test build on my machine, 
after making the minimal change to <distributor>, and I didn't see this 
error, but of course my test suite craps out when it gets to 
testmeta2010_new3, so it may never have gotten as far as this one.

The error seems to happen in testconstraint.xsd, which is (I think) 
generated from testconstraint.odd; I've looked inside both, and can't 
see anything that looks wrong to me. The error location is here in 
testconstraint.xsd:

    <xs:element name="bibl">
     <xs:annotation>
       <xs:documentation>(bibliographic citation) contains a 
loosely-structured bibliographic citation of which the sub-components 
may or may
     not be explicitly tagged. </xs:documentation>
     </xs:annotation>
     <xs:complexType mixed="true">
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:group ref="ns1:model.highlighted"/>
         <xs:group ref="ns1:model.pPart.data"/>
         <xs:group ref="ns1:model.pPart.edit"/>
         <xs:group ref="ns1:model.segLike"/>
         <xs:group ref="ns1:model.ptrLike"/>
 >>>>HERE>        <xs:group ref="ns1:model.biblPart"/>
         <xs:group ref="ns1:model.global"/>
       </xs:choice>
       <xs:attributeGroup ref="ns1:att.global.attributes"/>
       <xs:attributeGroup ref="ns1:att.declarable.attributes"/>
       <xs:attributeGroup ref="ns1:att.typed.attributes"/>
     </xs:complexType>
   </xs:element>

I can't see any mention of anything relevant in the ODD file, and 
everything in the XSD file looks as I would expect it to after adding 
distributor to model.respLike. The testconstraint.odd file seems to be 
testing constraints which have nothing to do with model.respLike or 
<distributor>.

The error itself is a bit cryptic:

"/srv/hudson/jobs/TEIP5-Test/workspace/Test/testconstraint.xsd:5540:34: 
error: 
http://www.w3.org/TR/xml-schema-1#cos-nonambig?"http://www.tei-c.org/ns/1.0":distributor&"http://www.tei-c.org/ns/1.0":distributor"

which I think refers to this:

"Schema Component Constraint: Unique Particle Attribution
A content model must be formed such that during ·validation· of an 
element information item sequence, the particle component contained 
directly, indirectly or ·implicitly· therein with which to attempt to 
·validate· each item in the sequence in turn can be uniquely determined 
without examining the content or attributes of that item, and without 
any information about the items in the remainder of the sequence.
Note: This constraint reconstructs for XML Schema the equivalent 
constraints of [XML 1.0 (Second Edition)] and SGML. Given the presence 
of element substitution groups and wildcards, the concise expression of 
this constraint is difficult, see Analysis of the Unique Particle 
Attribution Constraint (non-normative) (§H) for further discussion.

Since this constraint is expressed at the component level, it applies to 
content models whose origins (e.g. via type derivation and references to 
named model groups) are no longer evident. So particles at different 
points in the content model are always distinct from one another, even 
if they originated from the same named model group.
Note: Because locally-scoped element declarations may or may not have a 
{target namespace}, the scope of declarations is not relevant to 
enforcing either of the two preceding constraints."

<http://www.w3.org/TR/xmlschema-1/#cos-nonambig>

It suggests that there might be contexts in which <distributor> gets 
included twice, either by virtue of being a member of two models which 
are included, or because it's included once explicitly and once as part 
of model.respLike.

However, I've searched through the source, and I can't find any scenario 
that looks like that.

I'm going to revert my change until someone can help me figure out 
what's wrong. In the meantime, this does show how important it is (for 
someone like me, anyway) to get a build environment working properly 
before making changes to the source.

Incidentally, when I build locally, I'm just running "make". Is Jenkins 
using a different build target? I've tried various other targets -- some 
succeed, some fail (PDF fails because there's a space in the Minion Pro 
font name. ePub fails because I don't have kindlegen installed). But 
it's possible that Jenkins is using a different build target, and so 
extra tests are being run that don't get run on my local machine.

I'm going to revert this change, and annotate the ticket accordingly, 
but I'd like to figure out and fix the problem while it's fresh in my 
mind, so any help anyone can give me would be much appreciated.

Cheers,
Martin



On 11-04-21 10:43 AM, sebastian.rahtz at oucs.ox.ac.uk wrote:
> See<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/238/changes>
>
> Changes:
>
> [martindholmes] Added<distributor>  to model.respLike (ticket #2976715).
>
> ------------------------------------------
> Started by an SCM change
> Updating https://tei.svn.sourceforge.net/svnroot/tei/trunk/P5
> U         Source/Specs/distributor.xml
> At revision 8819
> [workspace] $ /bin/sh -xe /tmp/hudson1420918788626148054.sh
> + make clean validate test exemplars
> rm -rf release Guidelines Guidelines-web Schema DTD dtd Split RomaResults *~
> rm -rf Guidelines.??? Guidelines-* \
>          p5odds-examples.rng  p5odds-examples.rnc \
>          p5odds.rng p5odds.rnc \
>          *.xsd \
>          p5.sch p5.isosch \
>          *.isosch.xsl \
>          tei-*.zip \
>          Test/*.isosch \
>          p5subset.xml \
>          Utilities/guidelines.xsl Utilities-1/guidelines.xsl
> find . -name "semantic.cache" | xargs rm -f
> (cd Test; make clean)
> make[1]: Entering directory `<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Test'>
> rm -f test*.doc.xml test*.rnc test*.dtd test*.compiled.* test*.teix.xsd test*.xsd test*.rnc test*.rng test*.xsl test*.isosch
> rm -rf LOG *~ *.xsd Schema RomaResults DTD
> rm -rf *.doc.*
> rm -f detest.log detest.log.all
> rm -f *-examples.rng *-examples.rnc *test*.nvdl *-ex.odd
> rm -f detest.rnc    detest.rng   detest.dtd   detest.isosch
> make[1]: Leaving directory `<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Test'>
> (cd Exemplars; make clean)
> make[1]: Entering directory `<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Exemplars'>
> rm -f *.xsd *.dtd *.doc.* *.rnc tei*.rng *.compiled.* *~ *.xi
> rm -f exnames.xml
> rm -f enrich.rng isofs.rng
> rm -f names.xml
> make[1]: Leaving directory `<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Exemplars'>
> rm -rf FASC-*
> rm -rf catalogue.* modList
> rm -f       p5.xml
> rm -f       Guidelines.epub
> rm -f       Test/detest.rnc
> rm -f       Test/detest.rng
> rm -f       Test/detest.dtd
> rm -rf valid v.xml
> rm -f v.body v.header missfont.log
> rm -f *.stamp
> rm -f tei-p5-*_*deb
> rm -f tei-p5-*_*changes
> rm -f tei-p5-*_*build
> rm -f teiwebsiteguidelines.zip
> Checking you have running XML tools and Perl before trying to run transform...
> Perl:/usr/bin/perl
> xmllint:/usr/bin/xmllint
> trang:/usr/bin/trang
> jing:/usr/bin/jing
> saxon:/usr/bin/saxon
> rnv:/usr/bin/rnv
> touch check.stamp
> rm -rf DTD
> mkdir DTD
> BUILD: Generate modular DTDs
> saxon -ext:on  Source/guidelines-en.xml /usr/share/xml/tei/stylesheet/odds2/odd2dtd.xsl outputDir=DTD   \
>          lang=en \
>          documentationLanguage=en \
>
> rm -rf Schema
> mkdir Schema
> BUILD: Generate modular RELAX NG schemas
> saxon -ext:on  Source/guidelines-en.xml  /usr/share/xml/tei/stylesheet/odds2/odd2relax.xsl outputDir=Schema \
>          lang=en  \
>
> BUILD: Generate modular RELAX NG (compact) schemas using trang
> (cd Schema; for i in *rng; do trang $i `basename $i .rng`.rnc;done)
> BUILD: Extract schema rules to make p5.isosch
> saxon -ext:on  Source/guidelines-en.xml /usr/share/xml/tei/stylesheet/odds2/extract-isosch.xsl>  p5.isosch
> BUILD make subset of P5 with just the module/element/class/macro Spec elements
> saxon -ext:on  -o:p5subset.xml  Source/guidelines-en.xml Utilities/subset.xsl || echo "failed to extract subset from Source/guidelines-en.xml."
> touch p5subset.xml
> Checking you have a running roma2 before trying to make p5odds.rng ...
> which roma2 || exit 1
> /usr/bin/roma2
> roma2 "--localsource=`pwd`/p5subset.xml" --nodtd --noxsd --xsl=/usr/share/xml/tei/stylesheet/ p5odds.odd .
> ========= Roma starts at 2011-04-21 18:42:03 ===========
> TEI stylesheet tree: /usr/share/xml/tei/stylesheet/
> Results to: .
> Process p5odds.odd to create p5odds{.dtd|.xsd|.doc.xml|.rng|.rnc} in .
> ========= Roma starts execution at 2011-04-21 18:42:04.329492277 ===========
> using<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/p5subset.xml>  as default source
> 1. expand and simplify ODD
> 2. make RELAX NG from compiled ODD
> 3. make RELAX NG compact from XML
> ========= 2011-04-21 18:42:10.418648829 Roma ends
> Checking you have a running roma2 before trying to make p5odds-examples.rng ...
> which roma2 || exit 1
> /usr/bin/roma2
> roma2  "--localsource=`pwd`/p5subset.xml" --nodtd --noxsd --xsl=/usr/share/xml/tei/stylesheet/ p5odds-examples.odd .
> ========= Roma starts at 2011-04-21 18:42:10 ===========
> TEI stylesheet tree: /usr/share/xml/tei/stylesheet/
> Results to: .
> Process p5odds-examples.odd to create p5odds-examples{.dtd|.xsd|.doc.xml|.rng|.rnc} in .
> ========= Roma starts execution at 2011-04-21 18:42:11.222840483 ===========
> using<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/p5subset.xml>  as default source
> 1. expand and simplify ODD
> 2. make RELAX NG from compiled ODD
> 3. make RELAX NG compact from XML
> ========= 2011-04-21 18:42:17.430688901 Roma ends
> BUILD: Check validity with rnv
> xmllint --noent --xinclude Source/guidelines-en.xml>  Source.xml
> rnv -v p5odds.rnc Source.xml
> rnv version 1.7.10
> Source.xml
> BUILD: Check validity with nvdl/jing, including all examples with feasible validity
> ./run-onvdl p5.nvdl Source/guidelines-en.xml
> BUILD: Check full validity of relevant examples with nvdl
> saxon Source/guidelines-en.xml Utilities/extractegXML.xsl>  v.body
> echo "<!DOCTYPE p [">  v.header
> (cd valid; ls | perl -p -e  "s+(.*)+<\!ENTITY \1 SYSTEM \"valid/\1\">+")>>  v.header
> echo "]>">>  v.header
> cat v.header v.body>  v.xml
> ./run-onvdl  p5valid.nvdl  v.xml
> rm v.body v.header
> BUILD: Check validity with Schematron
> saxon -ext:on  p5.isosch Utilities/iso_schematron_message_xslt2.xsl>  p5.isosch.xsl
> saxon -ext:on  Source/guidelines-en.xml p5.isosch.xsl
> BUILD: Check validity with local XSLT script
> saxon -ext:on  Source/guidelines-en.xml Utilities/prevalidator.xsl>  Utilities/pointerattributes.xsl
> saxon -ext:on  Source/guidelines-en.xml Utilities/validator.xsl
> Note: target points to ID not in my namespace: #SA (TEI[1]/text[2]/body[3]/div["CO"]/div["COXR"]/p[6]/egXML[7]/p[8]/ptr[9]/)
> Note: target points to ID not in my namespace: #SATS (TEI[1]/text[2]/body[3]/div["CO"]/div["COXR"]/p[6]/egXML[7]/p[8]/ptr[9]/)
> Note: target points to ID not in my namespace: #SABN (TEI[1]/text[2]/body[3]/div["SA"]/div["SAXP"]/div["SACR"]/div["SACRex"]/p[8]/egXML[9]/p[10]/ptr[11]/)
> Note: span at from points to something I cannot find: 第二小節 (TEI[1]/text[2]/body[3]/div["AI"]/div["AISP"]/specGrp["DAISP"]/elementSpec["span"]/exemplum[8]/egXML[9]/span[10]/)
>
> Note: span at to points to something I cannot find: 第四小節 (TEI[1]/text[2]/body[3]/div["AI"]/div["AISP"]/specGrp["DAISP"]/elementSpec["span"]/exemplum[8]/egXML[9]/span[10]/)
>
> Note: fsdLink at target points to something I cannot find: doc1.xml#GPSG (TEI[1]/text[2]/body[3]/div["FS"]/div["FD"]/div["FDLK"]/p[7]/egXML[8]/TEI[9]/teiHeader[10]/encodingDesc[11]/fsdDecl[12]/fsdLink[13]/)
>
> Note: fsdLink at target points to something I cannot find: doc1.xml#GPSG (TEI[1]/text[2]/body[3]/div["FS"]/div["FD"]/div["FDLK"]/p[7]/egXML[8]/TEI[9]/teiHeader[10]/encodingDesc[11]/fsdDecl[12]/fsdLink[13]/)
>
> Note: target points to ID not in my namespace: #TDcrystals (TEI[1]/text[2]/body[3]/div["TD"]/div["TDphrase"]/div["TDphraseEA"]/p[7]/egXML[8]/div3[9]/p[10]/ptr[11]/)
> Note: moduleRef at url points to something I cannot find: svg11.rng (TEI[1]/text[2]/body[3]/div["TD"]/div["TDmodules"]/specGrp["TDSG2"]/elementSpec["schemaSpec"]/exemplum[8]/egXML[9]/schemaSpec["testsvg"]/moduleRef[11]/)
>
> Note: target points to ID not in my namespace: #COHQHF (TEI[1]/text[2]/body[3]/div["TD"]/div["TDcrystalsCE"]/div["TDcrystalsCEdc"]/p[7]/egXML[8]/listRef[9]/ptr[10]/)
> Note: moduleRef at url points to something I cannot find: svg11.rng (TEI[1]/text[2]/body[3]/div["TD"]/div["ST-aliens"]/p[6]/egXML[7]/schemaSpec["testsvg"]/moduleRef[9]/)
>
> Note: moduleRef at url points to something I cannot find: svg11.rng (TEI[1]/text[2]/body[3]/div["TD"]/div["ST-aliens"]/p[6]/egXML[7]/moduleRef[8]/)
>
> <?xml version="1.0" encoding="UTF-8"?>rm Utilities/pointerattributes.xsl
> rm Source.xml
> #@echo BUILD: Check validity with xmllint
> #xmllint  --relaxng p5odds.rng --noent --xinclude --noout Source/guidelines-en.xml
> BUILD: Check for places with no examples
> saxon Source/guidelines-en.xml Utilities/listspecwithnoexample.xsl
> BUILD Run test cases for P5
> (cd Test; make XSL=/usr/share/xml/tei/stylesheet)
> make[1]: Entering directory `<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Test'>
> BUILD: Test schema from testconstraint.odd
> Validate testconstraint.odd itself
> rnv ../p5odds.rnc testconstraint.odd
> testconstraint.odd
> saxon -o:testconstraint-ex.odd testconstraint.odd ../Utilities/odd2exodd.xsl
> roma2 --isoschematron --doclang=en --localsource=`pwd`/../p5subset.xml --nodtd --noxsd --xsl=/usr/share/xml/tei/stylesheet testconstraint-ex.odd .
> ========= Roma starts at 2011-04-21 18:42:56 ===========
> TEI stylesheet tree: /usr/share/xml/tei/stylesheet
> Results to: .
> Process testconstraint-ex.odd to create testconstraint-examples{.dtd|.xsd|.doc.xml|.rng|.rnc} in .
> ========= Roma starts execution at 2011-04-21 18:42:57.021861077 ===========
> using<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Test/../p5subset.xml>  as default source
> 1. expand and simplify ODD
> 2. make RELAX NG from compiled ODD
> 3. make RELAX NG compact from XML
> 9. extract Schematron from compiled ODD
> ========= 2011-04-21 18:43:03.005615440 Roma ends
> check egXML in testconstraint.odd
> perl -p -e "s/testlite-examples/testconstraint-examples/" ex.nvdl>  testconstraint.nvdl
> ../run-onvdl testconstraint.nvdl testconstraint.odd
> Run Roma on testconstraint.odd
> roma2 --isoschematron --doclang=en --localsource=`pwd`/../p5subset.xml --xsl=/usr/share/xml/tei/stylesheet testconstraint.odd .
> ========= Roma starts at 2011-04-21 18:43:03 ===========
> TEI stylesheet tree: /usr/share/xml/tei/stylesheet
> Results to: .
> Process testconstraint.odd to create testconstraint{.dtd|.xsd|.doc.xml|.rng|.rnc} in .
> ========= Roma starts execution at 2011-04-21 18:43:04.422015457 ===========
> using<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Test/../p5subset.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
> 5. make DTD from compiled ODD
> 9. extract Schematron from compiled ODD
> ========= 2011-04-21 18:43:13.085546251 Roma ends
> Validate using Jing for RELAX NG...
> jing -t testconstraint.rng testconstraint.xml
> Elapsed time 1104+52=1156 milliseconds
> Validate using RNV....
> xmllint --noent --dropdtd  testconstraint.xml | rnv testconstraint.rnc
> Validate using xmllint for DTD
> xmllint --dropdtd testconstraint.xml | xmllint --noout --dtdvalid testconstraint.dtd -
> Validate using Schematron
> saxon testconstraint.isosch ../Utilities/iso_schematron_message_xslt2.xsl>  testconstraint.xsl
> saxon testconstraint.xml testconstraint.xsl
>
>              lists inside paragraphs not supported  (tei:list)
>
>                  multi-valued rend is not supported  (contains(@rend,' '))
> You may not nest one s element within
>        another: use seg instead (tei:s)
>
>                divs of type 'canon' may contain only one 'canonText'
>               (@type='canon' and count (tei:div[@type='canonText'])&gt;1)
>
>                divs of type 'canon' may not be nested
>               (@type='canon' and parent::tei:div/@type='canon')
>
>                divs of type 'canon' may not be nested within 'register'
>               (@type='canon' and parent::tei:div/@type='register')
> Validate XSD using Jing ...
> cp xml.xsd.w3c xml.xsd
> test -f teix.xsd&&  perl -p -i -e 's+<.*\"xml.xsd\".*++' teix.xsd
> make[1]: [testconstraint.xsd] Error 1 (ignored)
> test -f spec.xsd&&  perl -p -i -e 's+<.*\"xml.xsd\".*++' spec.xsd
> make[1]: [testconstraint.xsd] Error 1 (ignored)
> test -f teix.xsd&&  mv teix.xsd testconstraint.teix.xsd
> make[1]: [testconstraint.xsd] Error 1 (ignored)
> test -f testconstraint.teix.xsd&&  perl -p -i -e "s/teix.xsd/testconstraint.teix.xsd/" testconstraint.xsd
> make[1]: [testconstraint.xsd] Error 1 (ignored)
> jing testconstraint.xsd testconstraint.xml
> <http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Test/testconstraint.xsd>:5540:34: error: http://www.w3.org/TR/xml-schema-1#cos-nonambig?"http://www.tei-c.org/ns/1.0":distributor&"http://www.tei-c.org/ns/1.0":distributor
> make[1]: *** [testconstraint.xsd] Error 1
> rm testconstraint.rng
> make[1]: Leaving directory `<http://bits.nsms.ox.ac.uk:8080/jenkins/job/TEIP5-Test/ws/Test'>
> make: *** [test] Error 2
>

-- 
Martin Holmes
University of Victoria Humanities Computing and Media Centre
(mholmes at uvic.ca)


More information about the tei-council mailing list