union
or |
Duplicates are eliminated
<?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) | (5 to 12) | (20 to 23)'>
<integer>
<xsl:value-of select="."/>
</integer>
</xsl:for-each>
</numbers>
</xsl:template>
</xsl:stylesheet>
Output:
<numbers>
<integer>3</integer>
<integer>4</integer>
<integer>5</integer>
<integer>6</integer>
<integer>7</integer>
<integer>8</integer>
<integer>9</integer>
<integer>10</integer>
<integer>11</integer>
<integer>12</integer>
<integer>20</integer>
<integer>21</integer>
<integer>22</integer>
<integer>23</integer>
</numbers>