OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

dss-x message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Details regarding the construction of ds-rw:DigestMethodType

Hi all,

sorry that I wasn't able to explain the construction principles of ds-rw:DigestMethodType right away in our call ... but having a second look at the structure everything's quite obvious:

The original XMLDSig type :

<complexType name="DigestMethodType" mixed="true"> 
    <any namespace="##other" processContents="lax" 
         minOccurs="0" maxOccurs="unbounded"/>
  <attribute name="Algorithm" type="anyURI" use="required"/> 

Think of JSON ... and the pain points are obvious:

The 'mixed' style is NOT supported by JSON (or ASN.1 or ...), so it is substituted by the (lowercase) 'value' string element. It is not mandatory to squeeze random text into your well-designed structure the replacement 'value' is a 0..1 element.

The next ugly guy is the 'xs:any', replaced by a sequence of 'xs:base64Binary' elements. Just a single 'xs:base64Binary'we presumed as _not_ sufficient to replace an unbound sequence of xs:any . So we end up with

ÂÂ <xs:complexType name="DigestMethodType">
ÂÂÂÂÂ <xs:sequence>
ÂÂÂÂÂÂÂÂ <xs:element name="value" type="string" minOccurs="0" maxOccurs="1"/>
ÂÂÂÂÂÂÂÂ <xs:sequence minOccurs="0" maxOccurs="unbounded">
ÂÂÂÂÂÂÂÂÂÂÂ <xs:element name="Base64Content"
ÂÂÂÂÂÂÂÂ </xs:sequence>
ÂÂÂÂÂ </xs:sequence>
ÂÂÂÂÂ <xs:attribute name="Algorithm" type="anyURI" use="required"/>
ÂÂ </xs:complexType>

The minOccurs="0" of Base64Content could be dropped and the maxOccurs='1' too. The sequence already got a minOccurs="0".Â

The third bloke in that gang of obstacles is not used here: The XPath / XPointer _expression_. The syntax inside relies upon the namespace prefixes declared in the surrounding document. This is again an 'XML-only' show so the NSPrefixMapping component was introduced to explicitly declare the translation of a prefix to a namespace.

These three trade-offs of the multi-syntax approach are described in the new core in section 2.2, including the sample of 'ds:Transform' to show the changes with a real-world object. I tried to explain the reasoning for this approach as good as possible there. Please take a look whether we can improve this part in any way. I do assume that it will alienate any XML-used reader.



Andreas KÃhne 
phone: +49 177 293 24 97 
mailto: kuehne@trustable.de

Trustable Ltd. Niederlassung Deutschland Gartenheimstr. 39C - 30659 Hannover Amtsgericht Hannover HRB 212612

Director Andreas KÃhne

Company UK Company No: 5218868 Registered in England and Wales 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]