Page 1 of 1

validation pb with a xi:include

Posted: Wed Feb 12, 2014 7:06 pm
by emmam
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

Re: validation pb with a xi:include

Posted: Wed Feb 12, 2014 8:29 pm
by adrian
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

Re: validation pb with a xi:include

Posted: Wed Feb 12, 2014 9:38 pm
by emmam
you're so right !
thanks a lot
Best,
emma