Subject:selecting data into node set between two values Author:david knight Date:30 Nov 2007 11:17 AM
Sorry if this is an extremely simple question, but I'm about as new to XML/XSL as you can be. I have the following XML, and need to select the data into chunks based upon a "change item" node having an "action_name" of "Create Order". So, in this data, there would be three chunks: one before the first create order, one between the two create orders and then the remaining data. I just can't figure out how to match it.
Subject:selecting data into node set between two values Author:James Durning Date:03 Dec 2007 09:45 AM
One way is to use generate-id.
Another way is to use key.
I like the key method personally:
<xsl:key name="CreateIndex" match="change_item_action" use="generate-id(preceding-sibling::change_item_action[
@action_name='Create Order'][1])"/>