validation pb with a xi:include

emmam
Posts: 16
Joined: Sat Jul 28, 2012 11:41 am

validation pb with a xi:include

Post by emmam » Wed Feb 12, 2014 7:06 pm

Hi all,
I have a tei file with a bibliography included in the <back> element of a <text> with a xinclude link.

<back>
<div type="bibliography">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xml/masterfiles/bibliography.xml"/>
</div>
</back>

bibliography.xml file is just a <listBibl> with a few <bibl/> and <biblStruct/> elements :

<listBibl>
<bibl> (...)</bibl>
<bibl> (...)</bibl>
etc.
</listBibl>

But the tei file doesn't validate.

The error message is :" [Jing] element "listBibl" not allowed anywhere; expected the element end-tag or element "ab", "addSpan", "anchor", "bibl", "biblFull", "biblStruct", "cb", "certainty", "cit", "dateline", "delSpan", "desc", "div", "divGen", "docAuthor", "docDate", "epigraph", "figure", "floatingText", "gap", "gb", "head", "index", "interp", "interpGrp", "join", "l", "label", "lb", "lg", "link", "linkGrp", "list", "listApp", "listBibl", "listEvent", "listNym", "listOrg", "listPerson", "listPlace", "listTranspose", "meeting", "metamark", "milestone", "msDesc", "notatedMusic", "note", "p", "pb", "precision", "q", "quote", "said", "sp", "space", "stage" or "substJoin""

the if I paste the listBibl directly in the back/div@type='bibliography' element, it does validate.

I don't get it. Can you tell me why and what I should do to use my bibliograhy as a masterfile (and take advantage of the content completion features).

thanks a lot in advance

emma

adrian
Posts: 2551
Joined: Tue May 17, 2005 4:01 pm

Re: validation pb with a xi:include

Post by adrian » Wed Feb 12, 2014 8:29 pm

Hi,

If it's a TEI P5 document, you most likely have forgotten about the namespace in the XIncluded XML document, bibliography.xml.
Make sure you have declared the TEI namespace as the default namespace on the root of the XIncluded document:

Code: Select all

xmlns="http://www.tei-c.org/ns/1.0"
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

emmam
Posts: 16
Joined: Sat Jul 28, 2012 11:41 am

Re: validation pb with a xi:include

Post by emmam » Wed Feb 12, 2014 9:38 pm

you're so right !
thanks a lot
Best,
emma

Post Reply