xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Rodriguez" <jeffreyr...@hotmail.com>
Subject Re: Schema local element scope problem in Xerces 1.2.0?
Date Thu, 14 Sep 2000 15:20:12 GMT
Hi Travers,
Thanks for reporting this.

A caveat is that there a few inconsistencies and bug in the primer, the 
final word should always be the Structures draft 
http://www.w3.org/TR/xmlschema-1/

I will consult with Eric Ye about this.

Thanks,
                 Jeffrey Rodriguez
                 IBM Silicon Valley
                 XML Development


>From: "Travers Waker" <traversw@innoforge.co.za>
>Reply-To: general@xml.apache.org
>To: <general@xml.apache.org>
>Subject: Schema local element scope problem in Xerces 1.2.0?
>Date: Thu, 14 Sep 2000 11:24:33 +0200
>
>Hi.
>
>When I get Xerces-J 1.2.0 to validate an XML document using the
>simple-as-can-be schema:
>----------------------------------------------------------------------------
>------
><?xml version="1.0" encoding="US-ASCII"?>
><xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>
><xsd:complexType name="type1">
>   <xsd:element name="name" type="xsd:string"/>
></xsd:complexType>
>
><xsd:complexType name="type2">
>   <xsd:element name="name" type="xsd:string"/>
></xsd:complexType>
>
></xsd:schema>
>----------------------------------------------------------------------------
>-----
>I get the following Exception:
>
>org.xml.sax.SAXParseException: Schema error: duplicate element decl in the
>same scope : name.
>
>But, according to W3C's XML Schema part 0: Primer document
>(http://www.w3.org/TR/xmlschema-0/), the two deaclarations of the name
>element should not be in the same scope.
>
>To Quote from the final paragraph of section 2.2:
>  "If the two things are elements within different types (i.e. not global
>elements), say I declare one element called name as part of the Address 
>type
>and a second element called name as part of the Item type, there is no
>conflict. (Such elements are sometimes called local element declarations). 
>"
>
>So, it looks to me like Xerces schema support is not exactly what W3C had 
>in
>mind when it comes to local element declarations.
>
>Can anyone shed some light on this?
>
>Thanks for any info/help.
>
>Travers
>
>
>---------------------------------------------------------------------
>In case of troubles, e-mail:     webmaster@xml.apache.org
>To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
>For additional commands, e-mail: general-help@xml.apache.org
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message