Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Sorting and replacing content

From: David Carlisle <davidc@--------->
To:
Date: 9/1/2004 11:50:00 AM
> I have this structure where the content of tags <A> to <E> have to determine
> the order of tag-content <a> to <e>. The result needs to be as shown below.

Tags and elements are not the same thing, the content of the start tag
<A> is "A" the content of the end tag </A> is also "A" and 3 is not
inside any tag at all (that's why it's known as element content: it's in
an element but not in a tag). XSLT of course has no direct access to the
tags at all they have been resolved by teh parser into an input node
tree,


That said, I think you want something like

<xsl:variable name=u" select="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
<xsl:variable name=l" select="abcdefghijklmnopqrstuvwxyz"/>

<xsl:for-each select="*[translate(name(),$u,'')='']">
 <xsl:sort datatype="number" select="."/>
  <xsl:variable name="ll" select="translate(name(),$u,$l"/>
  <no><xsl:value-of select="/root/*[name()=$ll]"/></no>
</xsl:for-each>

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent