- From: Antoli, Leo <Leo.Antoli@Misys.com>
- Date: Thu, 25 Jan 2007 13:05:22 -0000
- To: Michael Kay <mike@saxonica.com>, xmlschema-dev@w3.org, xml-dev@lists.xml.org
- Message-ID: <8ADC468FAD0DD811ABE500065BFE3CDA05E8EADF@pat.slough.midas-kapiti.com>
Thanks for the prompt response. So it's not covered in Schema 1.0 spec but will be likely covered in 1.1. Can anybody tell me what will happen to my example in Schema 1.1? Will they have the same identity or different? I'm seeing the following extract in last public working draft for Schema 1.1 Part 1: RQ_125iIssue (RQ-125i): <http://www.w3.org/Bugs/Public/show_bug.cgi?id=2837> Issue 2837 (RQ-125 identity of anonymous types), <http://www.w3.org/Bugs/Public/show_bug.cgi?id=2842> Issue 2842 (RQ-134 inherited portions of content model) Version 1.0 was deliberately reticent in stating identity conditions for components. With hindsight this was a mistake, and will be corrected. Resolution: Add {scope} property to type definition components which will either be the enclosing element declaration or "global", by analogy with element declarations {scope}. [For further context, see <http://www.w3.org/XML/Group/2004/05/xml-schema-ftf-minutes.html> F2F 2004-03-12, section RQ-125 (W3C-member-only link).] This change will solve the anonymous type equality problem by giving an unequivocal answer to the "who am I?" question for such types by way of the answer "Your identity is determined by your scope's identity." I'm not a W3C member so I don't have access to those links. Thanks. Regards, Leo Antoli _____ From: Michael Kay [mailto:mike@saxonica.com] Sent: 25 January 2007 12:40 To: Antoli, Leo; xmlschema-dev@w3.org; xml-dev@lists.xml.org Subject: RE: element with anonymous type in a group It's useful to start with the Note in section 3.4.6: <quote> Note: no_identityThe wording of clause 2.1 <http://www.w3.org/TR/xmlschema-1/#c-tid> above appeals to a notion of component identity which is only incompletely defined by this version of this specification. In some cases, the wording of this specification does make clear the rules for component identity. These cases include: * When they are both top-level components with the same component type, namespace name, and local name; * When they are necessarily the same type definition (for example, when the two types definitions in question are the type definitions associated with two attribute or element declarations, which are discovered to be the same declaration); * When they are the same by construction (for example, when an element's type definition defaults to being the same type definition as that of its substitution-group head or when a complex type definition inherits an attribute declaration from its base type definition). In other cases two conforming implementations may disagree as to whether components are identical. </quote> I'm not sure that your example is covered by any of these cases, so one might conclude that the question of identity is unclear in this case. Michael Kayhttp://www.saxonica.com <http://www.saxonica.com> _____ From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of Antoli, Leo Sent: 25 January 2007 12:15 To: xmlschema-dev@w3.org; xml-dev@lists.xml.org Subject: element with anonymous type in a group Hi all, My question is about what happens when an element with an anonymous type is defined in a group. Then when the group is referenced in several locations, is it the same anonymous type or they're actually different types (of course with the same definition)? When an anonymous type is used (e.g. in a XSLT or XQuery) XDM (XQuery 1.0 and XPath 2.0 Data Model) says that anonymous types must be given a unique name: For anonymous types, the processor must construct an anonymous type name <http://www.w3.org/TR/xpath-datamodel/#dt-anonymous-type-name#dt-anonymous-t ype-name> that is distinct from the name of every named type and the name of every other anonymous type. [dt_anonymous_type_nameDefinition: An anonymous type name is an implementation dependent, unique type name provided by the processor for every anonymous type declared in the schemas available.] Anonymous type names must be globally unique across all anonymous types that are accessible to the processor. In the formalism of this specification, the anonymous type names are assumed to be xs:QNames, but in practice implementations are not required to use xs:QNames to represent the implementation-dependent names of anonymous types. Imagine we have this schema: <xsd:group name="myGroup"> <xsd:sequence> <xsd:element name="myElement"> <xsd:complexType> <xsd:sequence> ............................................................................ ....................................................... </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:group> <xsd:element name="parent1"> <xsd:complexType> <xsd:group ref="myGroup"/> </xsd:complexType> </xsd:element> <xsd:element name="parent2"> <xsd:complexType> <xsd:group ref="myGroup"/> </xsd:complexType> </xsd:element> The question is: Do myElement local element in parent1 and parent2 have the same type? Or are they different as they're local elements with anonymous types? So should myElement type in parent1 have a different unique-name to myElement type in parent2? Or should they have the same unique name? I mean, is a group like a "copy/paste" so when a reference is done to a group is just like putting the group content there (so it would be like declaring a anonymous type twice)? Or implementation can be a bit "clever" and realise that they're really the same type even if it's anonymous and assign the same unique name to myElement type in both parent1 and parent2. Thanks a lot. Regards, Leo Antoli This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. Misys Banking Systems is a trading name of Misys International Banking Systems Limited which is registered in England and Wales under company registration number 00971479 and with its registered office address at Burleigh House, Chapel Oak, Salford Priors, Evesham WR11 8SP. THIS E-MAIL DOES NOT CONSTITUTE THE COMMENCEMENT OF LEGAL RELATIONS BETWEEN YOU AND MISYS INTERNATIONAL BANKING SYSTEMS LIMITED. PLEASE REFER TO THE EXECUTED CONTRACT BETWEEN YOU AND THE RELEVANT MEMBER OF THE MISYS GROUP FOR THE IDENTITY OF THE CONTRACTING PARTY WITH WHICH YOU ARE DEALING.
Received on Thursday, 25 January 2007 13:08:20 UTC