xsl-list
[Top] [All Lists]

group-starting-with problem

2005-12-12 12:49:00
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>