Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: redefine and interoperability problems

From: "Michael Kay" <mike@--------.--->
To: "'Jirka Kosek'" <jirka@-----.-->, <xmlschema-dev@--.--->
Date: 4/5/2007 1:23:00 AM
I personally think xs:redefine is one of those facilities (xsi:nil is
another) where you're better off pretending it doesn't exist. Implementors
don't have that luxury, but users do.

The specification of xs:redefine leaves a lot of room for interpretation. In
this particular case, the relevant phrase in the spec is:

"The definitions within the <redefine> element itself are restricted to be
redefinitions of components from the <redefine>d schema document"

and there's no statement anywhere about what it means precisely for a
component to be "from" a particular schema document. Saxon's interpretation
is that a model group definition component comes "from" a schema document if
the defining xs:group element is contained in that schema document, and an
xs:group element in an included document therefore does not qualify.
However, one could legitimately argue that the specification of xs:include
states:

"The .XML Schema. corresponding to <schema> contains not only the components
corresponding to its definition and declaration [children], but also all the
components of all the .XML Schemas. corresponding to any <include>d schema
documents."

and that it is this relationship between schema documents and schema
components that matters. Your guess is as good as mine (but when MSXML and
Xerces-J agree, I'm disinclined to differ.)

I wouldn't hold out great hope of these issues suddenly disappearing in 1.1.

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of Jirka Kosek
> Sent: 04 April 2007 23:28
> To: xmlschema-dev@w...
> Subject: xs:redefine and interoperability problems
> 
> Hi,
> 
> I'm not sure whether this is the right forum for my question, 
> but here it goes, please forward me somewhere else if this is 
> offtopic.
> 
> Suppose the following schema:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>            targetNamespace="http://www.w3.org/1999/xhtml"
>            xmlns="http://www.w3.org/1999/xhtml">
> 
>   <xs:redefine 
> schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
> 
>     <xs:group name="tr.content">
>       <xs:sequence>
>         <xs:choice maxOccurs="unbounded">
>           <!-- Remove th: <xs:element ref="th"/> -->
>           <xs:element ref="td"/>
>         </xs:choice>
>       </xs:sequence>
>     </xs:group>
> 
>   </xs:redefine>
> 
> </xs:schema>
> 
> Xerces-J and .NET validators are complaining about circular 
> group references.
> 
> XSV and libxml are happy with such schema.
> 
> Saxon-SA, MSXML 4.0 and Xerces-J complain about tr.content 
> group not being defined in xs:redefined schema (it is in fact 
> defined in schema which is included into the redefined schema).
> 
> As a dedicated RELAX NG user I could smile under my beard ;-) 
> But anyway, I thought that WXS interoperability is better in 2007.
> 
> Is my schema correct? If no, why? If yes, will be 
> underspecified behaviour (which is probably cause of 
> incompatibilities between
> implementations) improved in WXS 1.1?
> 
> Thanks,
> 
> 				Jirka
> 
> --
> ------------------------------------------------------------------
>   Jirka Kosek      e-mail: jirka@k...      http://xmlguru.cz
> ------------------------------------------------------------------
>        Professional XML consulting and training services
>   DocBook customization, custom XSLT/XSL-FO document processing
> ------------------------------------------------------------------
>  OASIS DocBook TC member, W3C Invited Expert, ISO/JTC1/SC34 member
> ------------------------------------------------------------------
>  Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.html
> 
> 


From sharmav@E... Wed Apr 04 23:52:36 2007
Received: from wiggum.w3.org ([128.30.52.23])
	by frink.w3.org with esmtp (Exim 4.50)
	id


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