RE: [xsl] Searching in Sub-children from an Array

Subject: RE: [xsl] Searching in Sub-children from an Array
From: "Houman Khorasani" <Houman.Khorasani@xxxxxxxxxxx>
Date: Wed, 14 Feb 2007 17:27:06 -0000
>I believe the problem is in this line:

>The section reading
>'(key('step',string-join(ancestor-or-self::*[@ID]/@ID,',')),.)' will
>select all matching Rate_Event nodes correctly, as well as the current
>node. The predicate at the end '[1]', will then take the first item in
>this list. I suspect you want to use some kind of conditional here...

You are right!! I had overlooked it. [*] has solved my problem. Many

One last question, I also had a mistake in the required XML output.
Maybe you can help me with that as well please:

XML Input is now slightly changed in <Rate_Structure_Event>, which
contains now few children called <Rate>:

	<fruit ID="111">
		<mango ID="333">
ConceptType="Rate_Structure_Event" ID="1">
		<orange ID="222">
			<Rate_Event ConceptType="Rate_Event"
			<Rate_Event ConceptType="Rate_Event"

Desired XML Output:

Exactly like before; but all <Rate> elements inside
<Rate_Structure_Event> shall be eliminated and replaced by all
<Rate_Event> inside <Fruit_adjustment> (Where the key is referring to
obviously, that's why we used Muecnhian Method). Only that the new
<Rate_Event> elements shall be actually renamed to <Rate>.

In other words the structure of the ouput doesn't change, the old <Rate>
are eliminated and new rates called <Rate_Event> replaces them without
forcing the element name to be changed from <Rate> to <Rate_Event>.

If this is not clear, I could give a simple example.

Many thanks for your advice,

Current Thread