You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by David Garcia <da...@partners.netfocus.es> on 2005/09/09 19:55:35 UTC

improvements over RetrievalMethodResolver

Hi,

Working with the class RetrievalMethodResolver I got some problems,
mainly when the retrieved content was transformed using an XPath
Transformer. 
For example using a "http://www.w3.org/TR/1999/REC-xpath-19991116"
transformer, if the query returned more than one node the code converted
the result into a byte[]and tried to parse it again.
That resulted in a fail, because the parser cannot parse the resulting
structure. It also made an unnecessary reparsing of the retrieved nodes
that caused an extra overhead.

To reproduce this error you can try to parse the signature provided
inside data/org/apache/xml/security/temp/key/retrieval-from-same-doc.xml
of the current release.
When executing the xpath transformation
(ancestor::my:KeyMaterials[@Id="thecert"]) 2 nodes where retrieved and
when the method tried to parse the result to get a KeyInfo (or child)
node an error was raised.

I made a refactor of the code supporting this case and eliminating the
need of reparse the xpath resulting set if the XmlSignatureInput
contains a node (or nodeSet).

I don't know how to contribute it so I post it to you, hoping that this
will be useful to someone ;).

Regards

Dave Garcia