Randal L. Schwartz wrote:
"Rob" == Rob Dixon <[EMAIL PROTECTED]> writes:

Rob> my @bad = $doc->findnodes(q{//address[starts-with(code, "BJPU")]});

Actualy, doesn't that require code immediately below addess?

Yes

Don't you want .//code there ?

Almost certainly not. In the example XML <code> appeared only as a child element
of <address>. In the general case it is unlikely to reappear at a lower level
and // would force the XSLT engine to search further than was necessary.

By the way the dot is also unnecessary as it is implicit before // anywhere
except at the beginning of a path expression. (A path starting with // covers
all descendants of the document root.)

HTH & Happy Christmas

Rob



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to