Hi,
Oleg Tkachenko wrote:
Btw, here is another pattern that matches root node :o)
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="mykey" match="/" use="'root'"/>
<xsl:template match="key('mykey', 'root')">
I suppose the pattern is what's written inside the match attribute in
the stylesheet :) - so that's the same as ever, except that it's in a
key, not a template?
Thanks for the answers. Just wanted to be sure. I'm doing some XSTL
analysis where I rewrite match expressions to let them match only one
particular node type (root node, named element, ...), and I just wanted
to make sure that the only possible match pattern that could have
accepted the root node in some previous iteration of my analysis was
"/" (don't need to rewrite that).
Oh, and I thought up another pattern that will match the root node (not
its child, the document element): A union pattern with a / as one of its
subpatterns...
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--