Subject: [xsl] Processing an XML file with a DTD in it From: "Derek Hohls" <DHohls@xxxxxxxxxx> Date: Thu, 25 Nov 2004 12:38:04 +0200 |
I have an XML file that look somewhat like: <?xml version="1.0"?> <!DOCTYPE mydoc2 PUBLIC "mydoc2.dtd" "http://www.wapforum.org/DTD/wml_1.2.xml"> <months> <month id="1">January</month> <month id="2">February</month> <month id="3">March</month> <month id="7">July</month> </months> When I view the above file in, say, IE, it seems happy to dipslay it. But, when I try a simple transform to get an XML without the DTD: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="@*|node()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> I get back a "null" result: <?xml version="1.0" encoding="ISO-8859-1"?> How do I work with such XML files? Thanks Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl:import on a resource file, xptm | Thread | Re: [xsl] Processing an XML file wi, David Carlisle |
Re: [xsl] Accessing node from diffe, David Carlisle | Date | Re: [xsl] Processing an XML file wi, David Carlisle |
Month |