Alain Pierrot wrote:
> I am at a loss with namespaces and relaxNG:
>
> My css xpath nodetests work with DTD controlled documents:
> for instance with element p
> content: xpath('count(//p)');
> works.
>
> With a relaxNG valid doc, I get a 0 count, with or without prefixing the
> namespace (for instance HS)
> I get the right count if I write:
> content: xpath('count(//*[name()="HS:p"])');
>
>
> What do I miss?
You need to declare the namespace prefix "HS" in the *CSS style sheet*
using something like this at the top of the file:
---
@namespace HS url(http://www.foo.com/ns/hors_service);
---
(This is standard CSS3.)
This is orthogonal to the namespace prefixes declared in the document.