EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Does XMLBlackbox support XPath Filter 2.0 transforms?

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#30363
Posted: 08/14/2014 08:55:52
by Venkat S (Basic support level)
Joined: 08/14/2014
Posts: 9

Hi,
I searched for this info in the Knowledgebase but I could not find it. Basically, I want the following output (snippet) in the final signature.

Code
      <ds:Reference Id="xmldsig-ref0" URI="#jaarrekening.xml">
         <ds:Transforms>
            <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
            <ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
               <dsig-xpath:XPath xmlns:dsig-xpath="http://www.w3.org/2002/06/xmldsig-filter2" xmlns:xbrli="http://www.xbrl.org/2003/instance" Filter="intersect">/xbrli:xbrl//*[not(starts-with(local-name(), 'DocumentAdoption'))]</dsig-xpath:XPath>
            </ds:Transform>
         </ds:Transforms>
         <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
         <ds:DigestValue>2AwR1kLp05tQHq43PxCoAnutLCymj18lUo931BQJyfg=</ds:DigestValue>
      </ds:Reference>


AS you can see, it was using the XPath Filter 2.0 transformation (with Intersect option). The XMLBlackbox says it supports only Core specs: https://www.eldos.com/documentation/sbb/documentation/ref_cl_xmlxpathtransform.html

Core spec: http://www.w3.org/TR/xmldsig-core/#sec-XPath
XPath Filter 2.0 spec: http://www.w3.org/TR/xmldsig-filter2/

Thanks.
#30364
Posted: 08/14/2014 08:58:45
by Eugene Mayevski (EldoS Corp.)

Yes, this transform is supported.


Sincerely yours
Eugene Mayevski
#30365
Posted: 08/14/2014 09:14:14
by Venkat S (Basic support level)
Joined: 08/14/2014
Posts: 9

hi, thanks for the quick response. Could you please point out a sample for Filter transform in the Knowledgebase? If not available, can you add it to this thread?
#30366
Posted: 08/14/2014 11:40:01
by Dmytro Bogatskyy (EldoS Corp.)

In fact, XPath Filter2 transform is partially supported at the moment (only intersect operation).
Sample code:
Code
TElXMLXPathFilter2Transform transform = new TElXMLXPathFilter2Transform();
TElXMLXPathFilterItem item = new TElXMLXPathFilterItem();
item.Filter = SBXMLTransform.Unit.xfIntersect;
item.XPath = "/xbrli:xbrl//*[not(starts-with(local-name(), 'DocumentAdoption'))]";
itme.NamespaceMap.Add("xbrli", "http://www.xbrl.org/2003/instance");
transform.Add(item);


P.S. In you sample xml you have a strange order of transforms. Usually the canonicalization transform added at the end of chain. In your case, the first transform would produce the octet stream as output, then the second transform expect a node-set as input, so it would parse the octet stream as xml and then transform the data.
#30367
Posted: 08/14/2014 14:03:35
by Venkat S (Basic support level)
Joined: 08/14/2014
Posts: 9

Thanks, I could create a signature successfully :)
Not sure about the order of transforms. That was in the specification of the receiving party. I'll keep it in mind and provide a feedback to them, if necessary.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 684 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!