|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Reformatting
I have an XML structure that has a tag for each of the possible 24 channels
available in a T1 line. If a given channel is not available, no node is
generated.
<T1>
<ch>1</ch>
<ch>2</ch>
<ch>3</ch>
<ch>4</ch>
<ch>10</ch>
<ch>11</ch>
<ch>12</ch>
<ch>13</ch>
<ch>24</ch>
</T1>
That said, I transform the XML into HTML by simply using:
<xsl:template match="ch">
<xsl:apply-templates/>,
</xsl:template>
to produce:
1,2,3,4,10,11,12,13,24
I am trying to use XSLT format the output abbreviating ranges of channels.
The above would ideally be formatted as:
1-4,10-13,24
Can this be done with XSLT? Perhaps any of the string() functions?
Thanks,
Greg
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








