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: RE: [dss] anonymous types


Trevor - This issue doesn't just come up when one uses a definition from one
schema in another schema.  We might use the same type definition in a number
of places in our own schema.  Then we will be forced to use the same name.

Sometimes, having different names for elements of the same type in a single
schema can make things clearer.

Anyway.  I don't feel strongly about this.  I will be happy with the
editor's choice.  All the best.  Tim.

-----Original Message-----
From: Trevor Perrin [mailto:trevp@trevp.net]
Sent: Monday, October 06, 2003 4:33 PM
To: dss@lists.oasis-open.org
Subject: [dss] 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 


To unsubscribe from this mailing list (and be removed from the roster of the
OASIS TC), go to
http://www.oasis-open.org/apps/org/workgroup/dss/members/leave_workgroup.php
.


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