|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Bad element when DTD specified
Example showing failure:
xml
<?xml version="1.0"?>
<!DOCTYPE svg SYSTEM "SVG-19990812.dtd">
<svg>
<g>
<desc content="structured text">Contained Description of it</desc>
<title content="structured text">Contained Title of it</title>
<g>
<desc content="structured text">Second desc</desc>
<title content="structured text">Second title</title>
</g>
</g>
</svg>
DTD also available at "http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
stylesheet
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl='http://www.w3.org/XSL/Transform/1.0'
xmlns="http://www.w3.org/TR/REC-html40"
result-ns="">
<xsl:output method="html"/>
<xsl:template match="/" >
<html>
<head>
<title>
<xsl:text>SVG RDF </xsl:text>
</title>
</head>
<BODY>
<xsl:apply-templates/>
</BODY>
</html>
</xsl:template>
<xsl:template match="g">
<xsl:choose>
<xsl:when test="@id">
<p><b>Item: </b> <xsl:value-of select="@id"/> <br />
<b> Title: </b><xsl:value-of select="./title"/> <br />
<b> Description: </b> <xsl:value-of select="./desc"/>
<xsl:apply-templates/>
</p>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="desc">
</xsl:template>
<xsl:template match="title">
</xsl:template>
</xsl:stylesheet>
Output
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/TR/REC-html40">
<head>
<title>SVG RDF </title>
</head>
<BODY>
</BODY>
</html>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








