Rafael wrote:

All in All it seems is easier if you put all namespace definitions you need in the signature element.

Regards,

Raul




The problem is that it isn't either a good solution as, that way, we can't develop an automatic process for arbitrary xml documents.


Regards,
-R




OK, imagine this situation:

<doc>
 <a bla:xmlns="http://a";>
    <bla:ToBeSigned/>
 </a>
 <b bla:xmlns="http://b";>
      <bla:ToBeSigned/>
 </b>
<doc>

and your xpath selection is bla:ToBeSigned which node you want to select? remember that the prefix doesn't mean anything is the URI what counts. So what you need to say is {http://b}:ToBeSigned.
In order to do this you define a namespace node(that can be the root of the document) with this mapping and you pass it to XPATH.eval. And this what you are doing in your examples with:
//c.setXPathNamespaceContext( "bla", "http://www.bla.com"; );
And I think it is only the good way of doing it. But if you solve the above problem better , you will be welcome.




Reply via email to