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

RE: group-starting-with problem

Subject: RE: group-starting-with problem
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 12 Dec 2005 20:18:29 -0000
group starting with
> 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>

The type of this variable is document-node(elemnet(element)): that is, a
document node whose child is an element named "element".

The path expression $element_definition_lines/line selects the children of
this document node that are named "line", and there aren't any.
> 
> I've tried the following code:
> 
> <xsl:for-each-group select="$element_definition_lines/line"
> group-starting-with="REQUIRED " >
> 
> Please note the space in the group-starting-with attribute.  

The group-starting-with attribute is a match pattern. Your pattern is
matching elements named REQUIRED. To match elements whose string value is
"REQUIRED ", use group-starting-with="line[.='REQUIRED ']". To match
elements whose string value starts with "REQUIRED ", use
group-starting-with="line[starts-with(.,'REQUIRED)]"

Michael Kay
http://www.saxonica.com/

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.