Project

Profile

Help

Bug #3758 » test.xsl

Test stylesheet demonstrating the issue - Andy Yar, 2018-04-24 16:07

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="3.0">
<xsl:output media-type="text/plain" method="text"/>

<!-- root -->
<xsl:template match="root">
<xsl:for-each select="element | element/element[starts-with(@name, 'S')]">
<xsl:value-of select="
if (some $x in element/@name
satisfies starts-with($x, 'S') and position() != 1) then
('1')
else
('2')"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
(1-1/2)