EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Reverse order in Trasform Algorithm

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 11/17/2015 04:45:13
by Filippo Menditto (Standard support level)
Joined: 11/13/2015
Posts: 5

I add a transform item with

1.Dim transform As TElXMLXPathFilter2Transform = New TElXMLXPathFilter2Transform

2.Dim item As TElXMLXPathFilterItem = New TElXMLXPathFilterItem
3.item.XPath = "/descendant::ds:Signature"
4.item.Filter = SBXMLTransform.Unit.xfSubtract
5. transform.Add(item)

The result is:

-<ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
<XPath xmlns="http://www.w3.org/2002/06/xmldsig-filter2" Filter="subtract">/descendant::ds:Signature</XPath>

but I would:
-<ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
<XPath Filter="subtract" xmlns="http://www.w3.org/2002/06/xmldsig- filter2">/descendant::ds:Signature</XPath>

xpath filter= and xmlns= are in different order. It's possibile to invert the order of this two item ?
Posted: 11/17/2015 05:07:00
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us,

xpath filter= and xmlns= are in different order. It's possibile to invert the order of this two item ?

It might be possible using OnFormatElement event handler (you need to filter "XPath" element and then change the order of generated attributes).
But, why you may need this?
According to the xml specification

the order of attribute specifications in a start-tag or empty-element tag is not significant

You can check it at section 3.1 at http://www.w3.org/TR/REC-xml/#sec-starttags



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