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

RE: Bad element when DTD specified

Subject: RE: Bad element when DTD specified
From: DPawson@xxxxxxxxxxx
Date: Fri, 3 Sep 1999 20:13:49 +0100
bad element
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


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.