except
<?xml version="1.0"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes"/> <xsl:template match="/"> <numbers> <xsl:for-each select='(3 to 10) except (5 to 12)'> <integer> <xsl:value-of select="."/> </integer> </xsl:for-each> </numbers> </xsl:template> </xsl:stylesheet>
Output:
<numbers>
<integer>3</integer>
<integer>4</integer>
</numbers>