[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 2004-02-12 11:55 -0500, Jiang, Peiyun wrote:
Yes.
No. The internal declaration subset is considered an aspect of the syntax of the input document, and it is not preserved in the data model for XPath upon which XSLT operates. Therefore, there is no way to copy that information to the result tree, which is also constructed using the data model for XPath. Without representation in the data model, there is no way your input can be preserved for the output.
You have two choices:
(1) - create a mini-DTD that contains your internal declaration subset plus a parameter entity reference to your main DTD
- you can then point to the mini-DTD in your <xsl:output>, without an internal declaration subset, and the resulting file will find those declarations and the main body through the parameter entity reference
(2) - craft your own resulting internal declaration subset using a text node and disable-output-escaping.
I hope this helps.
............................. Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] internal subset of DTD lost in output - but want to keep it
Subject: Re: [xsl] internal subset of DTD lost in output - but want to keep it From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 12 Feb 2004 12:25:46 -0500 |
At 2004-02-12 11:55 -0500, Jiang, Peiyun wrote:
I have a document that has a doctype with public ID , system ID and an internal subset of DTD.
When I do XLST translation with xml output and specify System ID and public ID: <xsl:output method="xml" doctype-public="...." doctype-system="...." indent="no" encoding="ISO-8859-1" />,
the internal subset of DTD is lost in the output document.
Is this expected behavior?
Yes.
Is there a way to keep the internal subset of DTD?
No. The internal declaration subset is considered an aspect of the syntax of the input document, and it is not preserved in the data model for XPath upon which XSLT operates. Therefore, there is no way to copy that information to the result tree, which is also constructed using the data model for XPath. Without representation in the data model, there is no way your input can be preserved for the output.
You have two choices:
(1) - create a mini-DTD that contains your internal declaration subset plus a parameter entity reference to your main DTD
- you can then point to the mini-DTD in your <xsl:output>, without an internal declaration subset, and the resulting file will find those declarations and the main body through the parameter entity reference
(2) - craft your own resulting internal declaration subset using a text node and disable-output-escaping.
I hope this helps.
............................. Ken
-- Public courses: upcoming world tour of hands-on XSL training events Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO Washington, DC: 2004-03-15 San Francisco, CA: 2004-03-22 Hong Kong: 2004-05-17 Germany: 2004-05-24 England: 2004-06-07 World-wide on-site corporate, government & user group XML training!
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Using redirect but need to se, Mikael Petterson (KI | Thread | [xsl] Grouping problem, Uslu, Cihan Y (MED) |
[xsl] Using redirect but need to se, Mikael Petterson (KI | Date | Re: [xsl] internal subset of DTD lo, David Carlisle |
Month |