This is my stylesheet below:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text" encoding="us-ascii" media-type="text/plain"
indent="no" cdata-section-elements=""/>
<xsl:template match="SERVICE_MEASUREMENT">
<xsl:text>DROP TABLE </xsl:text>
<xsl:value-of select="@DB_NAME"/>
<xsl:text>;
</xsl:text>
</xsl:template>
</xsl:stylesheet>
The "DROP TABLE" string is being copied to the result file correctly but all
the CDATA information from other elements that do not match the template are
also being copied to the result file.
Thanks for your help.
--
Shannon Ray Hughes
sr******@lucent.com
919-463-3166
"Shannon Hughes" <sr*************@earthlink.net> wrote in message
news:hJ*************@newsread1.news.atl.earthlink. net...
I created a simple 7 line stylesheet in XML Spy that is matching certain
elements (table names) used to created some SQL syntax in the result file.
I had to do this for 4 different Elements so I created 4 different
stylesheets. Two of them are working as expected. The other two are
printing out the correct values to the result file but are also including all my
CDATA information from elements that do not match the template match
clause. Any ideas what I am doing wrong? This is my first day using XSLT.
Shannon Hughes
FVBC Webmaster
http://www.fvbaptist.org