[oXygen-user] Copy the Document Type Definition of XML file

George Cristian Bina
Thu Dec 17 16:48:59 CST 2009


Dear Rossen,

The DTD declaration is not part of the data model for XSLT so it is not 
accessible in XSLT. If you know the DTD then yes, use the xsl:output 
element to output it. Otherwise you will require a pre-processing step 
to detect the DTD and a post-processing step to add that in the output.

Best Regards,
George
-- 
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Rossen Kovachev wrote:
> Hi!
> 
> I'm trying to copy resp. to modify an XML document via XSL. Here I use 
> the usual identity template:
> 
> <xsl:template match="@*|node()">
>    <xsl:copy>
>      <xsl:apply-templates select="@*|node()"/>
>    </xsl:copy>
> </xsl:template>
> 
> Unfortunately the DTD definition of the source document is not copied at 
> this way.
> 
> Does anybody know how can I accomplish this?
> 
> The only idea I had was that you can use <xsl:output> to write a DTD 
> declaration with XSL. However, I have no idea how I can read out the 
> declaration from the source XML document. Is this possible with XSL?
> 
> 
> 
> Thanks for any suggestions!
> 
> Rossen
> 
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user



More information about the oXygen-user mailing list