santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pellerin, Clement" <Clement_Pelle...@ibi.com>
Subject RE: xpath and xmlsec expression using concat
Date Tue, 06 Sep 2011 21:20:50 GMT
Can you tell us which transform you are calling?

The common XPath transforms are XPathFilter (http://www.w3.org/TR/1999/REC-xpath-19991116)
and XPathFilter2 (http://www.w3.org/2002/06/xmldsig-filter2). They are designed to filter
nodes out of the signature reference. They can take byte input, but their output must be a
nodeset.

-----Original Message-----
From: Paul [mailto:ppage4@yahoo.com] 
Sent: Tuesday, September 06, 2011 11:17 AM
To: dev@santuario.apache.org
Subject: xpath and xmlsec expression using concat


I know I can use xmlsec to sign an xml doc with a list of xpaths such 
as //aa, //bb, ... but what I like to do is sign a doc with this xpath 
expression: 

concat(substring(/Record/Name/text(),1,10), substring(/Record/Address/text
(),1,20), ... )

When I try this expr., I get this error: 

Can not convert #STRING to a NodeList!

Now, that makes sense, but I don't have control over the xmlsec sign method so 
I'm wondering if there is another way to do this? Is there another xpath 
operator to convert a string to nodelist? Or maybe there is another way to use 
xmlsec?

There is a requirement in the project I'm working on to sign just parts of the 
xml doc as one big string so that's why I was trying to use the xpath concat 
operator instead of signing individual elements but maybe the two are 
equivalent when using concat/substring?


thanks,
Paul.


Mime
View raw message