Re: [xsl] dealing with doctype dtd's

Subject: Re: [xsl] dealing with doctype dtd's
From: "Bob DuCharme" <bob@xxxxxxxxx>
Date: Tue, 30 Jan 2001 17:08:55 -0500
> But I would like to be able to identify the existing doctype in the
original
> xml, and output it in the new XML without changing it, or omit it
altogether
> if it does not exist.

It can't be done, especially the SYSTEM declaration part.

An XSLT processor uses an XML parser read in the source document, parse it,
and build a source tree for the XSLT processor to go through when applying
templates. While the XML parser may look at the input document's DOCTYPE
declaration to see where to find the DTD, it doesn't pass this information
about where it found the DTD to the XSLT processor. So, the XSLT processor
has no way of knowing whether the DTD was stored in sample1.dtd,
sample2.dtd, or included in as part of group of internal DTD subset
declarations (i.e. included between square braces in the DOCTYPE declaration
instead of being stored in a separate file referenced by a SYSTEM
declaration.)

Sorry!

Bob DuCharme          www.snee.com/bob           <bob@
snee.com>  "The elements be kind to thee, and make thy
spirits all of comfort!" Anthony and Cleopatra, III ii



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


Current Thread