Hey Aleksey,

thanks for the inforamtion .
I expected xpath transformations would be processed on the DOM tree not on a node set.
Selecting a node by addressing it's path in a tree couldn't work in this case.


Fyi, I helped myself with another xpath expression switching from top down to bottom up condition checking.
Each node in the node set has to fulfill some consitions about its ancestors.


A sample statement now looks like:
<XPath xmlns:ns="urn:namespace"> ancestor-or-self::ns:Root and ancestor-or-self::ns:FirstChild </XPath>


Matthias


Aleksey Sanin wrote:


Hi, Matthias!

The "(//. | //@* | //namespace::*)" part simply selects all nodes in the
document and then the condition inside square brackets selects the
desired nodes. This way of XPath transform processing is described
in XMLDSig specification [1]. Unfortunately, I don't know a simple
way to achieve the result you want using the XPath transform.
However, there is a new XPath2 transform [2] and xmlsec does support it.
Using this transform you'll easily get what you want because it does not
require implicit "square brackets".  The downside is that less toolkits
support it thus you might have interop problems with non-xmlsec
based implementations.

Aleksey


[1] http://www.w3.org/TR/xmldsig-core/#sec-XPath [2] http://www.w3.org/TR/xmldsig-filter2/





_______________________________________________ xmlsec mailing list [EMAIL PROTECTED] http://www.aleksey.com/mailman/listinfo/xmlsec

Reply via email to