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

RE: XSL & DTD question

Subject: RE: XSL & DTD question
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Tue, 15 Feb 2000 17:38:02 -0700
globals.dtd
Paul Bell wrote:
> I have a bunch of 'constant' entities defined in file
> globals.dtd.  I can pull these constants into my XML
> files via something like:
> <!DOCTYPE MYDOC SYSTEM "my.dtd" [ 
    <!ENTITY % globals SYSTEM "globals.dtd">
    %globals;
  ]> 
>
> <MYDOC> 
> </MYDOC>
> and so on.  
> But if I want to make the same set of constant entities
> available to an XSL file (still XML, right?), I run into
> a variety of problems, the first of which is that the
> first element of my XSL file is likely to be
> <xsl:stylesheet>.

Althought the XML spec doesn't say so in so many words, the DTD is a logical
structure that may be physically defined inside or among multiple entities.
It is considered to be the combination of all of the DTD subsets that have
been parsed for a given document.

A non-validating parser such as what is typically used by an XSL processor
will still look at the DTD to get entity declarations, so it is perfectly OK
to "add" to an XSL document's DTD by putting declarations in the internal
subset:

<!DOCTYPE xsl:stylesheet [
    <!ENTITY % globals SYSTEM "globals.dtd">
    %globals;
  ]>
<xsl:stylesheet>
...
</xsl:stylesheet>  

However, keep in mind that external entities such as the one declared in the
example above are not required to be parsed by a non-validating parser.
(someone may want to correct me on this.. it's a thorny issue)


 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.