Subject: Re: [xsl] XInclude in Cocoon From: Paul Grosso <pgrosso@xxxxxxxxxxxxx> Date: Tue, 06 Feb 2001 15:59:40 -0600 |
At 21:14 2001 02 06 +0000, Peter Flynn wrote: >On Tue, 06 Feb 2001, Bill wrote: >[me] >> > Do you have to strip the XML Declaration and the DocType Declaration >> > from an XML file before letting it be included? Or can you leave them >> > on? What happens if the file you include is not syntactically valid wrt >> > the DTD of the file you're including it in? >> >> 1) No, XInclude takes care of that for you. > >Cool. Right. This should be explained at: http://www.w3.org/TR/xinclude/#processing >> 2) I don't know what happens if you include an invalid (as opposed to a >> non-well formed) file. > >What I meant was, what happens when you include a TEI Lite file >inside a DocBook file? The two have incompatible markup. You're still thinking in terms of parsing a document with external entities against a DTD. XML--along with its concept of well-formedness and its companion specs such as Infoset, XInclude, XSLT, XML Schema etc.--has, for better or worse, taken us beyond that. XInclude is defined in terms of merging infosets. Even well-formed but not valid documents have infosets. So, inclusion is really orthogonal to validation. Put another way, you can think of inclusion as: 1. parse the parent document to create an infoset. 2. run over the infoset with an XInclude-aware processor and, for each xinclude element, run off to the referenced document, parse it to create an infoset, and 3. insert the to-be-included infoset (removing decls at the top and deleting the xinclude element itself). 4. recurse as necessary. Now you've created a new infoset. If you want, you can run some validation pass on that infoset if that makes sense given your application, but you needn't. You still have a well-defined infoset, regardless of whether you can validate it against any of the DTDs against which the original bits were parsed. paul XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Same problem: Unknown op code, Matthias O. Will | Thread | Re: [xsl] XInclude in Cocoon, Peter Flynn |
Re: [xsl] Position() of parent node, Joe English | Date | Re: [xsl] XInclude in Cocoon, Peter Flynn |
Month |