|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Whose axis am I?
At 02:19 PM 04/03/2000 -0700, quagly wrote:
[Aside: remove "match" from the end tag there.] Here, you're telling the processor "Whenever you encounter an element named 'tag' in the source tree, place into the result tree the value of its 'name' attribute." With two different tag elements, each of which has a different value for its name attribute, you get two different attribute values. But: [Aside: remove "match" from the end tag there.] If I may say, this is a rather bizarre select expression. The template match is identical to the previous one, e.g. "Whenever you encounter an element named 'tag' in the source tree...." But the select statement here is saying, "...then *back up to the parent of that 'tag' element*, get the child of that parent named 'tag' and place into the result tree the value of its 'name' attribute." What makes this bizarre is that of course the "tag" element doesn't have just ONE child named tag, it's got TWO. Since you can't get "THE attribute value" of "TWO tag elements' name attributes," the processor is picking the value of the FIRST tag element's name attribute, no matter which of the original tag elements it's processing. (I ran this with XT and assume that other processors will do the same.) I haven't tested it, but I bet if you added 8 or 10 or 159 tag elements, you'd have "greedy" in the result tree that many times. ================================================================ John E. Simpson | "I was gratified to be able to answer http://www.flixml.org | promptly. I said I don't know." simpson@xxxxxxxxxxx | (Mark Twain) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








