Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting rid of DTD from XML doc

Status
Not open for further replies.

aswolff

Programmer
Jul 31, 2006
100
US
I have an XML document which contains a DTD declaration as the 2nd line of the document. I want to strip it out..because my customer does not want to validate based on it. Is this possible via XSLT?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE PurchaseOrder SYSTEM "../dtd/LBUM.dtd">
<PurchaseOrder>
<POHeader>


Thank you.
 
How about applying an identity transform to it?
[tt]
<?xsml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl:eek:utput method="xml" indent="yes" encoding="utf-8" />
<xsl:template match="@*|node()|processing-instruction()|comment()">
<xsl:copy>
<xsl:apply-templates select="@*|node()|processing-instruction()|comment()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top