[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Details regarding the construction of ds-rw:DigestMethodType
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"> <sequence> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="Algorithm" type="anyURI" use="required"/> </complexType>
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">
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: email@example.com 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