[Home] [By Thread] [By Date] [Recent Entries]
Hi Jerome,
At 12:36 PM 2/22/2006, you wrote: Basically, it works. You are almost half right. This is not happening so that the result be valid to the source's DTD. Most of the time that would be a bad idea and undesirable. Rather, you are apparently doing a near-identity transformation, in which most of what the stylesheet is doing is simply copying the input to the result. But your DTD contains attribute declarations that provide default values to some of the attributes in your document. Accordingly, when your DOCTYPE declaration is in place, the parsed document (the tree-shaped thing on which the transform actually operates) contains the attributes -- which then get copied along with the rest. If you want these not to be there, simply write your stylesheet to suppress them instead of copying them. Depending on how your identity transformation is constructed, this can be as easy as: <xsl:template match="@isFloatColumnFooter | @whenResourceMissingType | @isIgnorePagination"/> Alternatively, ensure that the DTD is not used by removing or commenting out the DOCTYPE declarations in your input; as you've found, the defaulted attributes won't then be copied to the result. But the first solution is less of a hack. Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|

Cart



