EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Does XMLBlackbox support XPath Filter 2.0 transforms?

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
Posted: 08/14/2014 08:55:52
by Venkat S (Basic support level)
Joined: 08/14/2014
Posts: 9

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.

      <ds:Reference Id="xmldsig-ref0" URI="#jaarrekening.xml">
            <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:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>

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/

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

Yes, this transform is supported.

Sincerely yours
Eugene Mayevski
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?
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:
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");

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.
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: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.



Topic viewed 665 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!