Subject: RE: Answers to review questions in "Beginning XSLT": Chapter 7
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Mon, 17 Mar 2003 11:13:29 -0600
|
Oops, another change to my revised answers.
> Anyway, the revised answers:
> *[name() = 'Program'] -- a child element of . named Program that is in the
> default namespace (that is in scope at this point in the source document)
> (or no namespace if there is no default).
> *[starts-with(name(), 'tv:')] -- a child element of . that is in the namespace
> associated with the tv: prefix in the source document
assuming there is only one such prefix. If there is more than one, it is
likely that *[starts-with(name(), 'tv:')] will select those elements that are
marked with the 'tv:' prefix in the source document, but not guaranteed.
It may not select any elements. But it will not select any elements that
are not in the namespace associated with 'tv:'.
No wonder caution is advised in using name()!
> *[name() = 'tv:Program'] -- a child element of . named Program that is
> in the namespace associated with the tv: prefix in the source document.
Same caveat as above.
Lars
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|