[
Lists Home |
Date Index |
Thread Index
]
- From: desimonp@iname.com
- To: xml-dev@xml.org
- Date: Sun, 01 Oct 2000 18:30:27 -0400 (EDT)
> Say I have the following:
> <xml id="OriginalXML">
> <root>
> <Sub_Root_Node>
> <Row field1="value1" field2="value2" />
> <Row field1="value1" field2="value2" />
> <Row field1="value1" field2="value2" />
> <Row field1="value1" field2="value2" />
> <Row field1="value1" field2="value2" />
> <Row field1="value1" field2="value2" />
> </Sub_Root_Node>
> </root>
> </xml>
> <xml id="xslfile" src="filexsl.xsl"></xml>
>
> I want to rebuild the XML, but have it sorted based field1, if it wasn't
> sorted at all or it was sorted on field2. What am I missing? I am using:
> var newXML = OriginalXML.transferNode("xslfile.XMLDocument");
>
> newXML is blank and newXML.xml is undefined...
>
> I tried the following: fileXSL.xsl
>
> <?xml version="1.0"?>
> <xsl:output method="xml"/>,
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
> <xsl:template match="/">
> <root>
> <Sub_Root_Node>
> <xsl:apply-templates select="Sub_Root_Node" />
> </Sub_Root_Node>
> </root>
> </xsl:template>
> <xsl:template match="Sub_Root_Node">
> <xsl:for-each select="Row" order-by="lmfLateDateCount">
> <Row
> field1="<xsl:value-of select="@field1" />"
> field2="<xsl:value-of select="@field2" />"
> />
> </xsl:for-each>
> </xsl:template>
> </xsl:stylesheet>
>
> Peter
>
>
>
>
>
>
>
--
++++++++++++++++++++++++++++++++++++++++++++++
Peter DeSimone
Email Address: desimonp@iname.com
New Email Address: peter@desimone.com
Web Address: Http://www.bigfoot.com/~desimonp
New Web Address: http://www.peter.desimone.com
ICQ: 20177836
AOL Instant Messenger: Peterdesi1
++++++++++++++++++++++++++++++++++++++++++++++
---------------------------------------------------
Get free personalized email at http://www.iname.com
|