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

Re: collapsing consecutive elements

Subject: Re: collapsing consecutive elements
From: Saverio Perugini <sperugin@xxxxxxxxxxxxxxxx>
Date: Sun, 20 Jan 2002 14:25:05 -0500 (EST)
Re:  collapsing consecutive elements
How would you reverse this process?

For example, transform






That seems to be a more difficult problem.

The following is my initial attempt.  It does not work.

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

<xsl:template match="*">

   <!-- only a default value for the binding -->
   <xsl:param name="x" select="{name()}"/>

   <xsl:if test="contains($x, '_and_'">

      <xsl:element name="{substring-before(name(), '_and_')}">
            <xsl:with-param name="x" select="substring-after(name(), '_and_')">




Many thanks,

Saverio Perugini

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.