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

Re: The XSL-List Digest V2 #608 Entities.

Subject: Re: The XSL-List Digest V2 #608 Entities.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 20 Apr 2000 18:44:27 +0100 (BST)
Re: The XSL-List Digest V2 #608 Entities.
> Mid stream I use a document() to retrieve and
> process another xml file (file2)
> The doctype, local entities I have defined for
> file1 are completely dissociate from those of
> file2. Am I right in this? 

yes

> And any entities I
> define within the stylesheet, they are only
> 'valid for use' within the stylesheet?

yes


The point is that document() supplies a node set and similarly
the original document and the stylesheet produce node sets
(in each case a set of one node, the root node of the respective
documents)

but to produce a node set you have to parse the things as XML 1.0
documents and that means that the scope of entity declarations has to be
as described in XML 1.0.  If you have the file

<foo>
&xxx;
</foo>

then as it stands it is not well formed XML, and so nothing the XSL spec
says about document() could change that, the file won't get past an XML
parser.

To make it well formed you either have to stick a DOCTYPE at the top of
the file which declares xxx or you can include this file into another
XML document (that does have such a DOCTYPE) but as an external parsed
entity, not as an XML document. External parsed entities ie something
declared via <!ENTITY filewithxxx SYSTEM "aaa.xml"> .... &filewithxxx;
are expanded by the XML parser as part of building the node tree for XSL
so such an inclusion is invisible to XSL it as if the included file had
been copied into the including file.

David


 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.