[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Processing an XML file with a DTD in it

Subject: Processing an XML file with a DTD in it
From: "Derek Hohls" <DHohls@xxxxxxxxxx>
Date: Thu, 25 Nov 2004 12:38:04 +0200
apply dtd to xml
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

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.