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

Re: internal subset of DTD lost in output - but want t

Subject: Re: 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
internal subset dtd
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

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.