[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 keepit
From: Eliot Kimber <ekimber@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Feb 2004 20:15:12 -0800
dtd internal subset
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? Is there a way to keep the internal subset of
DTD?

As others have said, there's no way to preserve arbitrary input internal DTD subsets using XSLT alone. However, it is easy to write a SAX program to copy the internal subset.


Why do you need the internal subset in this case? I can only think of two reasons that you would need an internal subset in this case:

1. You are redeclaring parameter entities in order to tailor the external declarations specifically for the document instance.

2. You are generating entity references in the output document and need to declare the entities.

If you are doing case (1) I'd be interested to know why you're doing it.

If you are doing case (2), then if you have enough information to generate entity renference you probably have enough information to generate the declarations for those entities.

If you're trying to preserve the input entity structure in the output document, XSLT is the wrong tool. You should probably be using something like a SAX process where you have direct access to all aspects of the input document, including the internal subset and all entity references.

Cheers,

Eliot
--
W. Eliot Kimber
Professional Services
Innodata Isogen
9030 Research Blvd, #410
Austin, TX 78758
(512) 372-8122

eliot@xxxxxxxxxxxxxxxxxxx
www.innodata-isogen.com


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.