[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|