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

 


Help: OASIS Mailing Lists Help | MarkMail Help

dss message

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


Subject: anonymous types



Juan Carlos pointed out 2 things about the schema -

  1) The <KeySelector> includes a <ds:Signature>, instead of being of type 
ds:SignatureType.
  2) Elements are defined with "Anonymous Type Definitions" [1].

As for (1), it seems more readable to re-use element names, so you can look 
at an XML document and recognize "that's a ds:Transforms", "that's a 
ds:KeyInfo", etc., without consulting the schema to figure out what type 
everything is.

As for (2), if we did it the Juan Carlos / XML-DSIG way, where every 
element has a named Type, then other schemas could re-use our types without 
re-using our names.  But none of the protocol pieces seem reusable anyways, 
so named types don't seem to have much benefit.

Rich has an article mentioning this topic [2] -

"I used to think that defining types and then instances of those types was 
the way to do things. In my mind, the 
<http://www.w3.org/TR/xmldsig-core/>XML Signature specification was the 
apotheosis of this style.
[...]
Instead, following Tim's suggestion, use anonymous types, essentially 
in-lining the data definition:
[...]
You can argue that this limits reuse, forcing anyone who wants to use a 
definition from another schema is forced to use that schema's name, and I 
don't disagree. But engineering is all about trade-offs, and I have come to 
believe that this meets the 80/20 rule. After all, 
<http://www.w3.org/TR/REC-xml>XML is all about element names, and 
<http://www.w3.org/TR/REC-xml-names/>Namespaces in XML is the official 
mechanism for distributed naming. One of the great fissures in the XML 
community can be expressed as those who like the W3C XML Schema type 
system, and those who abhor it. Web services have, so far, been forced into 
the former camp, unnecessarily antagonizing the latter."


Do people have other arguments, one way or the other?

Trevor

[1] http://www.w3.org/TR/xmlschema-0/, 2.4
[2] http://webservices.xml.com/pub/a/ws/2003/09/02/typeless.html 



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