Hello, I need to take the following XML and transform
it into something
quite simpler, this might be the result:
<?xml version="1.0">
<FLDS>
<FLD name="orig_fld_name"/>
<FLD name="orig_fld_name"/>
<FLD name="orig_fld_name"/>
<FLD name="orig_fld_name"/>
...
</FLDS>
Now, I get how to loop through the following XML, and
all that jazz... but I
need help setting up the template so that I can write
back XML. As in: how
do you write XML tags (nodes), can you prefix them? I
have set the XSL
output to "XML", is there some sort of copy command.
Thanks!
Karl
What I have to work with is a persisted ADOXML
Recordset, and it looks like
this:
Go ahead and send 20% of you paycheck to Rob Rohan...
hehehehe
<?xml version="1.0" encoding="utf-8"?>
<!--
Author:
File:
Date:
Purpose:
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:s="uuid:BDC6E3F0 6DA3 11d1 A2A3 00AA00C14882"
exclude-result-prefixes="s xsl"
<xsl:output method="xml" indent="yes"
encoding="UTF-8"/>
<xsl:template match="/">
<FLDS>
<xsl:apply-templates />
</FLDS>
</xsl:template>
<xsl:template
match="/xml/s:Schema/s:ElementType/s:AttributeType">
<xsl:element name="FLD">
<xsl:attribute name="name">
<xsl:value-of select="@name" />
</xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
_/ _/_/ _/_/_/
_/_/ _/ _/ _/
_/ _/
_/ _/
_/ _/_/_/_/
http://treebeard.sourceforge.net
http://ashpool.sourceforge.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list