Marsoner Stephan wrote:
> I tried to use xpath to get some statistical information into my styled
> view and the following happend:
>
> xpath("count(..//jur_block)") doesn't work (wrong result: 0)
>
> xpath("count(..//ns:jur_block)" doesn't work either (wrong
> result: 0)
>
> (ann: xpath("name(..)") delivers the parent of jur_block as ns:section)
>
> BUT:
>
> xpath("count(..//*[local-name(.)='jur_block'])")) works
> flawlessly!!!
I doubt that this is a bug in XXE.
It seems that you need to use qualified names in your XPath expressions.
Because this XPath expression is found inside the CSS style sheet, you
need to declare the namespace *inside the CSS style sheet too*.
That is, namespaces and their prefixes found in the edited document are
not used in this case.
Example:
---
@namespace jj url(http://www.lexisnexis.at/namespace/test);
jj|foo:after {
display: inline;
content: xpath("count(..//jj:jur_block)")
}
---
See http://www.xmlmind.com/xmleditor/_distrib/docs/csssupport/ch04s04.html
----
PS: XPath expressions does not support the concept of default namespace.
Example, this does *not* work:
---
@namespace url(http://www.lexisnexis.at/test);
foo:after {
display: inline;
content: xpath("count(..//jur_block)")
}
---