You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Stampacchia Francesco <fr...@ttclab.com> on 2009/04/16 11:09:18 UTC

Insert XML signature into XPath signed elements

Hi to all!!

I found myself in the needs of inserting the whole signature element and tags
within the element signed through the xpath2filter Transform. 
Is it possible?

Here's an example of what I would do:

I've got the clean XML message:

Hi to all!!

I found myself in the needs of inserting the whole signature element and tags
within the element signed through the xpath2filter Transform. 
Is it possible?

Here's an example of what I would do:

I've got the clean XML message:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:ns1='http://www.mydomain.org'>
  <arg0>
    <item1>text1</item1>
  </arg0>
  <arg1>
    <item2>text2</item2>
  </arg1>
</root>

And I'm signing it with an enveloped signature using also xpath2filter passing
to this transform the following XPath = //root/arg0/item1/text(). 
I'd like to reuse this XPath in the needs of obtaining the following in the
signed message:

    <item1>text1
           <signature tags> ...
    </item1>                 
 

This means that the signature tags must follow the text within <item1></item1>.
Is this possible?!?

Thanks in advance.