- From: Frederik De Keukelaere <Frederik.DeKeukelaere@ugent.be>
- Date: Mon, 06 Jun 2005 09:08:14 +0000
- To: "'Oleg Tkachenko'" <oleg@tkachenko.com>
- Cc: <www-xml-xinclude-comments@w3.org>
Dear Oleg, all, Thank you for your response. I got the libxml2 to work with the example now. However the output(see below) of the inclusion seems to be invalid because it contains duplicate ids. Is this output valid according to XInclude, I thought the specification required XInclude processors to solve this? <root xmlns:xi="http://www.w3.org/2001/XInclude"> <Declaration> <Text id="copyright">Copyright MyCompany.</Text> </Declaration> <Instantiation> <Text id="copyright">Copyright MyCompany.</Text> <Text id="copyright">Copyright MyCompany.</Text> </Instantiation> </root> Kind regards, Frederik > -----Original Message----- > From: Oleg Tkachenko [mailto:oleg@tkachenko.com] > Sent: maandag 6 juni 2005 10:44 > To: Frederik De Keukelaere > Cc: www-xml-xinclude-comments@w3.org > Subject: Re: XInclude internal references and ID clashes processing > > Frederik De Keukelaere wrote: > > > If I am not mistaken the example below should be correct according to > the > > XInclude specification. > > It's correct, but won't work. > > > <?xml version="1.0" encoding="UTF-8"?> > > <root xmlns:xi="http://www.w3.org/2001/XInclude"> > > <Declaration> > > <Text id="copyright">Copyright MyCompany.</Text> > > </Declaration> > > <Instantiation> > > <xi:include xpointer="copyright"/> > > <xi:include xpointer="copyright"/> > > </Instantiation> > > </root> > > "copyright" in xpoiner attribute represents a shorthand XPointer pointer > [1] which depends on schema or DTD defined ID. In your document id > attribute isn't defined as ID typed, so xpointer="copyright" locates > nothing, which is resource error becoming fatal error when no > xi:fallback is provided. > > With id attribute defined as ID it works just fine with libxml2: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE root [ > <!ATTLIST Text id ID #REQUIRED> > ]> > <root xmlns:xi="http://www.w3.org/2001/XInclude"> > <Declaration> > <Text id="copyright">Copyright MyCompany.</Text> > </Declaration> > <Instantiation> > <xi:include xpointer="copyright"/> > <xi:include xpointer="copyright"/> > </Instantiation> > </root> > > [1] http://www.w3.org/TR/xptr-framework/#shorthand > > -- > Oleg Tkachenko > http://blog.tkachenko.com
Received on Tuesday, 7 June 2005 13:16:47 UTC