[Home] [By Thread] [By Date] [Recent Entries]
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
|

Cart



