xs:redefine of a imported namespace group

Hi,

I am trying to xs:redefine an xs:group from an imported schema, but that
group is referenced in an xs:complexType in the imported schema. Basically,
what I am trying to do is use the XHTML elements/attributes that I feel
would be semantically useful for our content management system clients and
then extend those with more things we think are useful for
content-piece-instance-documents, but not defined in XHTML. 

For example, the *imported* schema has the following group of 'block' types
of elements/groups defined:

<xs:group name="block">
  <xs:choice>
    <xs:element ref="x:P"/>
    <xs:group ref="x:lists"/>
    <xs:group ref="x:blocktext"/>
    <xs:element ref="x:TABLE"/>
  </xs:choice>
</xs:group>


This group is further refined by the following complexType in the *imported*
schema, like so:

<xs:complexType name="Flow" mixed="true">
  <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:group ref="x:block"/>
    <xs:element ref="x:FORM"/>
    <xs:group ref="x:inline"/>
    <xs:group ref="x:edit.inline"/>
  </xs:choice>
</xs:complexType>

-------------------

Then in the **importing** schema I redefine the 'block' group by:

<xs:redefine
schemaLocation="http://localhost:8080/lsb/Schemas/xhtml_modfd.xsd">
  <xs:group name="block">
    <xs:choice>
      <xs:group ref="c:lsb_core_blocks"/>
      <xs:group ref="x:block"/>
    </xs:choice>
  </xs:group>
</xs:redefine>

[[
'c:lsb_core_blocks' looks something like in the **importing** schema:

  <xs:group name="lsb_core_blocks">
    <xs:choice>
      ... etc ...
      <xs:element ref="c:callout"/>
      <xs:element ref="c:fineprint"/>
      <xs:element ref="c:tip"/>
      <xs:element ref="c:title"/>
      ... etc ...
    </xs:choice>
  </xs:group>
]]


Also in the **importing** schema I create a 'content-piece-type' for use in
our CMS app. This should have an 'article' root element and be able to use
the Flow complexType defined in the imported schema, which in turn includes
a choice for the redefined 'block' group from the importing schema....

For example:

<xs:element name="article">
  <xs:complexType mixed="true">
    <xs:complexContent mixed="true">
    <!-- NOTE: Flow is defined in the imported schema -->
      <xs:extension base="x:Flow">
        <xs:attributeGroup ref="x:coreattrs"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:element>

-------------------------

First, does the above even make sense? If it is, is what I am trying to do
appropriate/valid (the schema does validate). The problem is that I can't
get the schema to validate an instance document like:

<c:article 
  xmlns:c="http://livestoryboard.com/lsb/Schemas/2003/03/content" 
  xmlns="http://livestoryboard.com/lsb/Schemas/2003/03/xhtml1">
  <c:title>[ Enter Article Title ]</c:title>
  <P>[ Enter Article Paragraph ]</P>
  <c:section>
    <c:title>[ Enter Section Title ]</c:title>
    <P>[ Enter Section Paragraph ]</P>
  </c:section>
</c:article>

Any hints as to what I am doing wrong, or requests for any helpful
information I might be leaving out would be greatly appreciated (my head is
swimming in circles, currently...)

Thanks in advance,
-Rob

Received on Wednesday, 9 April 2003 15:28:50 UTC