Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


element with anonymous type in a group

From: "Antoli, Leo" <Leo.Antoli@-----.--->
To: xmlschema-dev@--.---, -------@-----.---.---
Date: 1/25/2007 12:15:00 PM
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. 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent