Thanks. That sorts the data, but then it outputs it to the page before I can format it.
I'm a bit of a beginner at XSLT, how can I get the sorted data into a variable? I normally cycle through each node using the code below, but the I need to update the data in the variable to the sorted data.
<xsl:for-each select="$xml/rows/row[contains(CMSPageUrl,$page) or contains(CMSPageUrl,'ALL')]">
Merging two XSLT files in memory.
I have a client that displays documents links on their Umbraco site from an XML list.
<rows>
<row>
<ID>1208</ID>
<Edit>0</Edit>
<DocIcon>pdf</DocIcon>
<Title>06 Effluent Reuse Pilot Scheme at Ngong Ping Lantau Hong Kong</Title>
<LinkFilename>006_Effluent_Reuse_Pilot_Scheme_at_Ngong_Ping_Lantau_Hong_Kong_.pdf</LinkFilename>
<Modified>2010-03-04 18:49:32</Modified>
<Editor>41;#Administrator</Editor>
</row>
</rows>
I have a second XML file with sort information I need to combine with this document:
<rows>
<row>
<ID>1208</ID>
<SortOrder>53</SortOrder>
</row>
</rows>
Hi Pete,
Something like this should work (though haven't exactly tested it) :
/Chriztian
Thanks. That sorts the data, but then it outputs it to the page before I can format it.
I'm a bit of a beginner at XSLT, how can I get the sorted data into a variable? I normally cycle through each node using the code below, but the I need to update the data in the variable to the sorted data.
<xsl:for-each select="$xml/rows/row[contains(CMSPageUrl,$page) or contains(CMSPageUrl,'ALL')]">
<li>
<xsl:if test="position()=last()">
<xsl:attribute name="class">
last
</xsl:attribute>
</xsl:if>
<xsl:call-template name="getTitle">
<xsl:with-param name="icon" select="DocIcon" />
<xsl:with-param name="title" select="Title"/>
<xsl:with-param name="doc" select="LinkFilename"/>
<xsl:with-param name="abbrev" select="Abbreviated_x0020_Title"/>
</xsl:call-template>
</li>
</xsl:for-each>
Hi Pete,
If you add a template for the <row> elements, every row will be rendered through that, e.g.:
And you can add the condition to the apply-templates statement:
/Chriztian
I've just tested it and it is working great. Thanks for your help.
is working on a reply...