[Home] [By Thread] [By Date] [Recent Entries]
At 12:15 PM 1/14/2004, Jeff wrote:
kakridge@xxxxxxxxxxxxx wrote:I've noticed the the Muenchian method uses '|' and that everyone refers to this as a Union. However, I also read that this <xsl:template match="foo | foobar"> means to match the foo OR foobar elements. Does the definition of the operator change based on the application? It may also help to recall the rationale for matching: my node matches a pattern if there is another node in the document from which my node can be retrieved, using the given pattern as an XPath expression. (This would make for chaos, except of course not all XPath location paths are allowed as patterns -- only some of the ones that look "down"). Since all foo and all foobar elements have parent nodes, any of them can be reached, from somewhere, using the XPath "foo | foobar". In other words, the pattern matches any node in the union set of foo and foobar elements. (The "or" operator returns a Boolean, so it can't be used in a pattern -- apart from inside predicates -- since it doesn't return nodes at all.) Hm, I seem to be offering lots of color commentary today.... Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



