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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Substitution Groups

[ Lists Home | Date Index | Thread Index ]

1.  <include>  should be <import> if the namespaces are different for the
two <schema>.

2.  B must import A, as you say.

3.  A does not need to import B.  Element A must be declared as the head of
a substitution group.  I think some or all uses of the A element in complex
types must be marked as allowing substitutions.  The instance documents
specified by the schema for A, in which element B is substituted for element
A should be parsed in an environment in which schema locations can be found
for both A and B.

Substitution groups would have been DOA as a practical concept if the
namespace of the head of the group had to incorporate by import the
namespaces of all possible substitutions.  One of the purposes of this was
for umbrella organizations or consortia to be able to declare abstract
(never-instantiated) elements of possibly abstract type and let others
provide all the instantiable derived types and substitute elements.

Jeff
----- Original Message ----- 
From: "Paul Spencer" <xml-dev@boynings.co.uk>
To: "Xml-Dev" <xml-dev@lists.xml.org>
Sent: Friday, February 18, 2005 2:00 AM
Subject: [xml-dev] Substitution Groups
...
> Are substitution groups practical when the head of the group is in a
> different schema document from the members of the group? The scenario is
> this:
>
> File A defines a complex data type AType and an element A of that type.
>
> File B defines a complex type BType that is an extension of AType and an
> element B of that type. Element B is in the substitution group for element
> A.
>
> It as an error if File B does not <include> file A since the XML Processor
> can't find the head of the substitution group.
>
> File A must <include> file B otherwise an instance that uses element B
will
> be invalid.
>
> However, if I have the circular <include> (file A <include>s file B and
file
> B <include>s file A) as some published examples do, MSXML is unhappy
because
> it sees multiple definitions.
>
> Am I being really stupid here? I'll probably realise as soon as I post
this.
>
> Regards
>
> Paul Spencer
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>





 

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

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