xsl-list
[Top] [All Lists]

RE: Correcting an XML document

2004-07-16 10:32:48
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(_at_)mhk(_dot_)me(_dot_)uk]
Sent: Friday, July 16, 2004 11:17 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Correcting an XML
documentxsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


 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


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--


<Prev in Thread] Current Thread [Next in Thread>