W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2003

RE: xs:redefine of a imported namespace group

From: Robert Koberg <rob@koberg.com>
Date: Sat, 19 Apr 2003 10:58:51 -0700
Message-Id: <200304191758.KAA15976@s5.servlets.net>
To: "'Henry S. Thompson'" <ht@cogsci.ed.ac.uk>
Cc: <xmlschema-dev@w3.org>

Hi and thanks for responding,

> You're  trying to use redefine exactly as it is intended, as far as I
> can tell without the full schema docs.  Which validator are you using?
> Have you tried XSV?


Yes. I have an example up now. I have run it through the online (and offline
XSV) validator at:
http://www.w3.org/2001/03/webdata/xsv

The schemas validate with no errors.

An invalid instance document to use in the online validator is at:
http://dev.94107.com/Schemas/test.xml

This points to a 'client' specific XSD:
http://dev.94107.com/Schemas/content.xsd

The above schema imports a 'client' global schema:
http://www.livestoryboard.com/Schemas/xhtml_modfd.xsd

I want the 'global' schema to be used by all clients as a base. From there I
am hoping that specific clients modify it for their specific needs using
content.xsd.

I must be doing something wrong with my redefines because XSV complains the
instance document is invalid at the point it hits one of my redefined
complexTypes. 

MSXML chokes on it in a different way, saying that the 'Block' redefine
(shown below) could not resolve
{schemaLocation='http://www.livestoryboard.com/Schemas/xhtml_modfd.xsd} of
<redfine>. 

So, XSV sees the imported XSD and uses it to validate, but ignores my
(attempted) redefines. MSXML does not see the global schema to do the
redefine.

For example this redefine does not work (in content.xsd):
<xs:redefine
schemaLocation="http://livestoryboard.com/lsb/Schemas/xhtml_modfd.xsd">
    <xs:complexType name="Block">
      <xs:complexContent>
        <xs:restriction base="x:Block">
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:group ref="c:lsb_core_blocks"/>
          </xs:choice>
        </xs:restriction>
      </xs:complexContent>
    </xs:complexType>
  </xs:redefine>

Redefining (in xhtml_modfd.xsd):
<xs:complexType name="Block">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="x:FORM"/>
      <xs:group ref="x:edit.inline"/>
      <xs:element ref="x:PRE"/>
      <xs:element ref="x:HR"/>
      <xs:element ref="x:BLOCKQUOTE"/>
      <xs:element ref="x:P"/>
      <xs:group ref="x:lists"/>
      <xs:element ref="x:TABLE"/>
      <!--<xs:group ref="c:lsb_core_blocks"/>-->
    </xs:choice>
  </xs:complexType>

Is the problem in the namespaces? In other words, since I redefine in the
content.xsd, does it now live the content.xsd targetNamespace? And when I
refer to x:Block it simply is not the redefine? Hope not... I use x:Block in
the imported schema and want it to pick up any change in the client specific
content.xsd. Hopefully this makes sense and the provided examples give a
better indication as to the problem.

Any help is greatly appreciated - thanks,
-Rob



> 
> ht
> --
>   Henry S. Thompson, HCRC Language Technology Group, University of
> Edinburgh
>                       Half-time member of W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
> 	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
> 		     URL: http://www.ltg.ed.ac.uk/~ht/
>  [mail really from me _always_ has this .sig -- mail without it is forged
> spam]
Received on Saturday, 19 April 2003 13:59:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT