|
Subject: [xsl] Reformatting From: "Brucato, Greg" <GBrucato@xxxxxxxxxxxx> Date: Thu, 10 May 2001 19:04:14 -0400 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Incrementing a Variable, Michael Kay | Thread | Re: [xsl] Reformatting, Jeni Tennison |
| RE: [xsl] Incrementing a Variable, Jon Wynacht | Date | Re: [xsl] parameters from Javascrip, Gitanjali |
| Month |