[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Reformatting

Subject: Reformatting
From: "Brucato, Greg" <GBrucato@xxxxxxxxxxxx>
Date: Thu, 10 May 2001 19:04:14 -0400
 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


Current Thread
  • Reformatting
    • Brucato, Greg - Thu, 10 May 2001 19:03:37 -0400 (EDT) <=
      • <Possible follow-ups>
      • Dan Diebolt - Fri, 11 May 2001 00:10:30 -0400 (EDT)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.