You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Andrzej Matejko <an...@pro.onet.pl> on 2008/03/26 01:04:36 UTC

Xpath and namespace problem

Hello,

  I've go signed xml file like:
 <?xml version="1.0" encoding="UTF-8"?>
<rootnode xmlns="something.xsd">
 <ds:Signature xmlns:ds="..">
 ...Reference
 ....<ds:Transforms>
 ....<ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
 </ds:Signature>
</rootnode>

 when I try to validate it xsec fails on ds:Signature lookup (xalan is
unable to resolve XPath equation).
 The question is: how to make xalan to resolve xpath with namespaces??
(xalan fails with error that ds prefix is not declared; as far as I debug
xml-security in txfmxpath.cpp in evaluateExpr method the namespaces
declarations are only searched in root node only, not in xpath parent node
and above).

  Does anyone have any experience with that (or knows how to make xalan work
:))

 best regards,
 andrzeJ