ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Transformation Node - Support for XSLT Sort

Post new topic  Reply to topic
 XML Transformation Node - Support for XSLT Sort « View previous topic :: View next topic » 
Author Message
petmor
PostPosted: Thu Mar 31, 2005 4:48 pm    Post subject: XML Transformation Node - Support for XSLT Sort Reply with quote

Apprentice

Joined: 20 Jun 2002
Posts: 45
Location: Pasadena, CA

Hi,

Any idea what version of XSLT the XML Transformation node in the WBI 5.1 toolkit supports? A sort function in an .xsl stylesheet of ours generates errors in the Transformation node. I'm told this function is part of XSLT 1.1. Is the XALAN transformation engine based on XSLT 1.0? If so, will a future CSD address this? Thanks!

Peter
Back to top
View user's profile Send private message Send e-mail AIM Address
dirac
PostPosted: Thu Mar 31, 2005 10:39 pm    Post subject: Reply with quote

Novice

Joined: 31 Mar 2005
Posts: 23

The sort function works fine for me on v5 CSD4

Try this example and see if it works for you:

xsl stylesheet:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="employees">
<ul>
<xsl:apply-templates select="employee">
<xsl:sort select="name/family"/>
<xsl:sort select="name/given"/>
</xsl:apply-templates>
</ul>
</xsl:template>
<xsl:template match="employee">
<li>
<xsl:value-of select="name/given"/>
<xsl:text> </xsl:text>
<xsl:value-of select="name/family"/>
</li>
</xsl:template>
</xsl:stylesheet>

html:
<?xml version="1.0" encoding="UTF-8"?><ul><li>John Chen</li><li>Anthony Dirkson</li><li>Jay Dirkson</li><li>Tony Dirkson</li><li>Loni Ota</li><li>Leonard Zuvela</li></ul>

xml:
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="sort.xsl"?>
<employees>
<employee>
<name>
<given>Loni</given>
<family>Ota</family>
</name>
</employee>
<employee>
<name>
<given>Leonard</given>
<family>Zuvela</family>
</name>
</employee>
<employee>
<name>
<given>John</given>
<family>Chen</family>
</name>
</employee>
<employee>
<name>
<given>Jay</given>
<family>Dirkson</family>
</name>
</employee>
<employee>
<name>
<given>Anthony</given>
<family>Dirkson</family>
</name>
</employee>
<employee>
<name>
<given>Tony</given>
<family>Dirkson</family>
</name>
</employee>
</employees>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Transformation Node - Support for XSLT Sort
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.