: I want to transform XML-1 to XML-2. The problem is : how do you transform 3 different nodes from XML-1 into an collection of nodes in XML-2.
: XML-1 looks like :
: <source>
: <greentea>yes</greentea>
: <earlgreytea>no</earlgreytea>
: <normaltea>yes</normaltea>
: </source>
:
: The above XML should be transormed into XML-2. XML-2 looks like this :
: <target>
: <tea>
: <flavor>greentea</flavor>
: </tea>
: <tea>
: <flavor>earlgraytea</flavor>
: </tea>
: <tea>
: <flavor>normaltea</flavor>
: </tea>
: <target>
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="source">
<target>
<xsl:for-each select="*">
<tea>
<flavor><xsl:value-of select="name()"/></flavor>
</tea>
</xsl:for-each>
</target>
</xsl:template>
</xsl:stylesheet>
infidel
$ select * from users where clue > 0
no rows returned