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

group-starting-with problem

Subject: group-starting-with problem
From: James Neff <jneff@xxxxxxxxxxxxxxxx>
Date: Mon, 12 Dec 2005 14:49:00 -0500
tethys health ventures
Greetings,

My input:

<xsl:variable name=element_definition_lines">

    <element>
     <line>REQUIRED ST01</line>
     <line>Code uniquely identifying a Transaction Set</line>
     <line>REQUIRED</line>
     <line>REQUIRED ST02</line>
     <line>Identifying control number that must be unique within the
transaction set</line>
    </element>

</xsl:variable>

I've tried the following code:

<xsl:for-each-group select="$element_definition_lines/line"
group-starting-with="REQUIRED " >
                   
    <xsl:element name="element" >
                       
        <xsl:for-each select="current-group()">
                       
            <xsl:copy-of select="." />
                   
         </xsl:for-each>
                       
      </xsl:element>

</xsl:for-each-group>

Please note the space in the group-starting-with attribute.  There will
always be a space in my input after the string 'REQUIRED' when I want a
new group seperator.  The third line has the string 'REQUIRED' also, but
does not have a trailing space and thus I do not want it considered as a
group seperator.

My desired output is:

    <element>
        <line>REQUIRED ST01</line>
        <line>Code uniquely identifying a Transaction Set</line>
        <line>REQUIRED</line>
    </element>   
    <element>
         <line>REQUIRED ST02</line>
         <line>Identifying control number that must be unique within the
transaction set</line>
    </element>


However it does not appear to be grouping.  All of the <line> elements
are part the group, instead of splitting them into two groups.

Can someone point me in the right direction please?

Thank you,

-- 

James Neff
Technology Specialist

Tethys Health Ventures
4 North Park Drive, Suite 203
Hunt Valley, MD  21030

office:  410.771.0692 x103
cell:    443.865.7874

Current Thread

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.