[xsl] Grouping - using Referenced Schema

Subject: [xsl] Grouping - using Referenced Schema
From: Karthik <ckkarthik@xxxxxxxxx>
Date: Fri, 16 Mar 2007 10:50:03 -0400
Hi,

I am new to XSLT. I have to group based on a node.

The source schema is a referenced Schema hence I am using Qualified
Name in XPath.

In a normal scenario we will use like

<xsl:variable name="unique-countries"
select="//cities/city[not(country=preceding-sibling::city/country)]/country"
/>

If using referenced schema then how to use the preceding sibling ???

<xsl:variable name="unique-countries"
select="/*[local-name()='cities' and
namespace-uri()='http://ABC/XYZ']/[local-name()='city' and
namespace-uri()='http://ABC/XYY'][not(country=preceding-sibling::city/country)]/*[local-name()='country'
and namespace-uri()='http://ABC/QWE']" />


Thanks in advance


--
Thanks,
Karthik

Current Thread