xsl-list
[Top] [All Lists]

Re: How to "copy" a DTD reference?

2003-08-13 11:40:51
Mark R. Diggory wrote:
Its been awhile since I posted to the list. I finally have a good question I can't find any solid resources on. Is there a way to copy a DTD reference in the original source document using XSL?

Not easily. You can specify a public and system id for a DTD to be
referenced in a DOCTYPE decl in the result using xsl:output, but there
is no way to retrieve them from the input from within the style sheet.
You can't use the usual trick of passing the values as parameters
either, because (AFAIK) xsl:output properties are constants. Some
processors allow the values to be AVTs, check whether it works with
yours.

If you use the XSLT from Java (JAXP), you could try to get the
input DTD from an entity resolver and use it to set the output
properties of the transformer object.

J.Pietschmann


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