[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: group-starting-with problem
> 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|