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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: HL7 use of xs:anyType extension

[ Lists Home | Date Index | Thread Index ]

Hi Pete,

"Pete Cordell" <petexmldev@tech-know-ware.com> writes:

>  <xsd:complexType name="varies">
>   <xsd:complexContent>
>    <xsd:extension base="xsd:anyType"/>
>   </xsd:complexContent>
>  </xsd:complexType>
>
> I've seen (incorrect) comments on the web that say this is an attempt to
> define an empty element.  Is this HL7's intent?  Or is it just an attempt to
> map the name 'varies' to xsd:anyType?

I believe varies is just an alias for anyType.


> The above type is then used in the following situation...
>
>   <xsd:complexType name="MFA.5.CONTENT">
>     <xsd:complexContent>
>       <xsd:extension base="varies">
>         <xsd:attributeGroup ref="MFA.5.ATTRIBUTES"/>
>       </xsd:extension>
>     </xsd:complexContent>
>   </xsd:complexType>
>
> What sorts of XML instances should this map to?  An empty element with
> attributes as defined in the attributeGroup?  Or, any number of attributes
> and element body content, that must also include the set of attributes
> defined in the attributeGroup?  i.e. is this some way of defining an
> extensible instance?

I think this definition does not make any sense. anyType matches any
content. If we agree that, in case of an extension, a base type is
matched before derived (which appears to be the case from the spec)
then base anyType will match everything and not leave anything to the
extension.

So I would say that if MFA.5.ATTRIBUTES defines any required attributes,
then the set of valid contents for this type is empty. Otherwise any
content matches with attributes from MFA.5.ATTRIBUTES never getting any
value.

hth,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS