[Home] [By Thread] [By Date] [Recent Entries]
At 2008-08-21 14:31 -0500, Mattoo, Utpal wrote:
What is the difference between the following 2 lines (Line 1 vs Line 2) (I know what these lines do, but i dont know HOW. Please find related XML at the end of the file )---- That checks only those child elements that have a partNum attribute and then checks to see if the child element is the first in the key table named 'parts' with a lookup value being the partNum attribute (presumably because the elements were loaded having partNum attributes but that doesn't have to be the case). Line 2 That checks *all* child elements using their partNum attribute for the lookup ... this is assuming that every element has a partNum attribute, otherwise the lookup value will be the empty string. ALSO what does this line do Suitable for XSLT 1.0 but not XSLT 2.0 the above will check the current node as being the first node in the key table using the node's partNum attribute as a lookup value. In XSLT 2.0 this will throw an error if there is more than one node in the key table with the associated lookup value. probably retrieves a part number only once but I don't understand how... Suitable for both XSLT 1.0 and 2.0 the above will do the same thing. Using generate-id() for node identity relies on the guaranteed principle that every node of every tree used in a single transformation will have a unique generated identifier. The value is opaque and should be used without inspecting how it is comprised. I hope this helps. . . . . . . . . . . Ken
|

Cart



