EAD>

This is the mail archive of the xsl-list@mrrytech.com mailing list .


<e border="0"> Index Nav: [Date In/A>] [Subject Index] [Author Index] [Thread Index] Message Nav: [Date Prev] [Date Next] [Thread&nPrev] [Thread Next]

RE: XSL & DTD question

Paul Bell wrote:
> Ie a bunch of 'constant' entities defined in file
> globals.dtd.  I can pull these constants into my XML
> files via soHjÂ:inlike:
> &;!ENTITY % globals SYSTEM "globals.dtd">
    %globals;
  ]>gt;
> <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
> firlement of my XSL file is likely to be
> <xsl:stylesheet>.

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

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

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

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


 XSL-List info and archive:  ht/www.mulberrytech.com/xsl/xsl-list

align="left">Index Nav:
[Date Index] [Subj0437">Author Index] [Threasp;Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
X-User-Footer-End-->