RE: [xsl] Correcting an XML document

Subject: RE: [xsl] Correcting an XML document
From: walter.crockett@xxxxxxxxxxxxxxxxxxxxx
Date: Fri, 16 Jul 2004 13:32:48 -0400
Here's the full text of the XSL document, whose purpose is to change the
value of all Datatype elements whose value is DATE to a value of TIMESTAMP,
and then produce a full corrected XML document, tags and all. I'm using XML
SPY and applying this XSL to the original XML document. The output I get,
however, is just a mass of values, without tags. 
 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
	<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
	
<xsl:template match="*">
<xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:copy>
</xsl:template>

<xsl:template match="Datatype[.='DATE']">
<Datatype>TIMESTAMP</Datatype>
</xsl:template>

</xsl:stylesheet>


-----Original Message-----
From: Michael Kay [mailto:mhk@xxxxxxxxx]
Sent: Friday, July 16, 2004 11:17 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Correcting an XML
documentxsl-list@xxxxxxxxxxxxxxxxxxxxxx


>  I get all the values in the document, but none of the XML 
> tags. I need to
> reproduce the entire XML document, tags and all, with the 
> changes in it.
> 
> Am I missing something simple?

Probably, but from the info given, I've no idea what it is. Please supply
more details of what you are doing, so we can see what you're doing wrong.

Michael Kay

Current Thread