yep... it some kind of recursion - current @id should be compared with
all other @id (except @id inside meta element)
22 февраля 2011 г. 23:02 пользователь Abel Braaksma
<abel(_dot_)online(_at_)xs4all(_dot_)nl> написал:
Hmm, maybe I misunderstand or we're mixing apples and pears. The way I see
it, you say "select all @id from whole doc which is not belong to meta node"
and that means check for each @id whether it belongs to a meta-node. You
cannot do that check only once. I don't see a difference between your and my
analysis.
On 22-2-2011 20:51, Вячеслав Седов wrote:
nope... select all @id from whole doc which is not belong to meta node
- result ia same for every node
2011/2/22 Abel Braaksma<abel(_dot_)online(_at_)xs4all(_dot_)nl>:
Вячеслав,
Actually, it _is_ dependent on the current node. //@id gets all @id nodes
in
the document. The next "[..]" means "filter these nodes by the following
expression". That expression is a node-test: "not(ancestor::meta)", which
is
applied to the _current_ node (the current @id-node).
That doesn't mean that a processor cannot optimize that, but in this case
that might proof futile: no single element can contain multiple
attributes
with the same name. Hence the processor will have to test the predicate
for
each and every found id-attribute.
In short: no, it cannot be calculated only once.
Kind regards,
Abel Braaksm
On 22-2-2011 20:26, Вячеслав Седов wrote:
@id = //@id except (@id, //meta//@id) - yep... good idea
but i think that even //@id[not(ancestor::meta)] should be calculated
only once since it not depend from current node - is not it? is
optimizer capable to recognize context dependant from context
independant XPath fragments inside predicate and calculate independant
fragments only once instead calculating it every time for each node?
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--