[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XInclude in Cocoon

Subject: Re: XInclude in Cocoon
From: Paul Grosso <pgrosso@xxxxxxxxxxxxx>
Date: Tue, 06 Feb 2001 15:59:40 -0600
xinclude xslt
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.