Re: [xsl] FW: Dealing with mixed content

Subject: Re: [xsl] FW: Dealing with mixed content
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 16 Feb 2005 14:48:23 GMT
  My question was more to do with the pattern Joris used, i.e. generate-id((..
  | preceding-sibling::hr)[last()]).

  I understand the generate-id() function but was not entirely sure what the
  pattern itself was doing.

to group nodes together you need an expression that returns the smae
string for every element in a group (and different strings for different
groups) It doesn't matter what the string is.

in your case you want to group nodes and you have two kinds of groups
(in one possible description)

one group which is everything before the first hr (if tehre is an hr)
zero or more groups of everything following each hr element 9up to teh
next one)

Joris's xpath of (..|preceding-sibling::hr)[last()] (which you'll often
see in the archives of this list) selects the parent node for any
element in the first group and the closest previous hr element for each
of the other groups, so applying generate-id() to that gives a string
with the right properties for identifying your groups.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread