[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: qname resolution question


evil overlord resolution
I suggest mailing bug reports to the Xerces team and Henry Thompson so the
issue can be resolved in both parsers.

--
THINGS TO DO IF I BECOME AN EVIL OVERLORD #18
I will not have a son. Although his laughably under-planned attempt to usurp
power would easily fail, it would provide a fatal distraction at a crucial
point in time.

----- Original Message -----
From: "Takuki Kamiya" <takuki@p...>
To: "Dare Obasanjo" <kpako@y...>; <xml-dev@l...>
Sent: Friday, December 28, 2001 7:45 PM
Subject: Re:  qname resolution question


> Hi Dare,
>
> Thanks for checking with .NET XML Reader.
>
> My schema processor which rejects such schemas seems to be
> consistent with MS behaviour. :-) It is sometimes difficult to write a
> XML schema which passes validation by all processors out there,
> which I hope will be improved.
>
> -Takuki Kamiya
>
>
> ----- Original Message -----
> From: "Dare Obasanjo" <kpako@y...>
> To: "Takuki Kamiya" <takuki@p...>; <xml-dev@l...>
> Sent: Friday, December 28, 2001 9:42 PM
> Subject: Re:  qname resolution question
>
>
> > I tried the schema on MSFT .NET's XmlValidatingReader and got the
> following
> > message
> >
> >     ERROR: The 'http://www.w3.org/2001/XMLSchema:documentBody' element is
> not
> > declared.
> >
> > which I think is correct and the wrong answer is that being given by XSV
> and
> > Xerces.
> >
> >
> > From section 3.15.3 [Constraints on XML Representations of Schemas] of the
> W3C
> > XML schemas Structures recommnedation, part 2.2.1 states that
> >
> > "Where the type of an attribute information item in a document involved in
> > ·validation· is identified as ·QName·, its ·actual value· is composed of a
> > local name and a  namespace name. Its ·actual value· is determined based
> on
> > its ·normalized value· and the containing element information item's
> [in-scope
> > namespaces] following [XML-Namespaces]:
> >
> > The appropriate case among the following must be true:
> >
> >   2 otherwise (its ·normalized value· is unprefixed) all of the following
> must
> > be true:
> > 2.1 its ·local name· is its ·normalized value·.
> > 2.2 The appropriate case among the following must be true:
> > 2.2.1 If there is a namespace in the [in-scope namespaces] whose [prefix]
> has
> > no value, then its ·namespace name· is the [namespace name] of that
> > namespace." [0]
> >
> > So from the above, this seems to mean when trying to resolve the qname of
> > documentBody in the ref attribute of the element it ends up as
> > http://www.w3.org/2001/XMLSchema:documentBody.
> >
> >
> >
> > But looking at section 3.3.2 [XML Representation of Element Declaration
> Schema
> > Components] it should be noted in the table for the element Element
> > Information Item there exists the following
> >
> >       Element Declaration Schema Component
> >             Property Representation
> >
> >             {target namespace} The ·actual value· of the targetNamespace
> > [attribute] of the parent <schema> element information item, or ·absent·
> if
> > there is none
> >
> >
> > so the from the documentBody's declaration it actually has no
> targetNameSpace.
> > Thus its qname should be "documentBody".
> >
> >
> > Thus the MSFT error message seems to be correct since there is no
> documentBody
> > element declared in the http://www.w3.org/2001/XMLSchema namespace while
> XSV
> > and Xerces look like they are incorrect.
> >
> > --
> > THINGS TO DO IF I BECOME AN EVIL OVERLORD #18
> > I will not have a son. Although his laughably under-planned attempt to
> usurp
> > power would easily fail, it would provide a fatal distraction at a crucial
> > point in time.
> >
> > ----- Original Message -----
> > From: "Takuki Kamiya" <takuki@p...>
> > To: <xml-dev@l...>
> > Sent: Friday, December 28, 2001 1:59 PM
> > Subject:  qname resolution question
> >
> >
> > > Hi,
> > >
> > > I am wondering if the following schema is valid or not.
> > > (I tend to think it is invalid.)
> > >
> > > Both XSV and xerces passes validation with it.
> > >
> > > What is the namespace name for the "documentBody"
> > > qname below? Is it "http://www.w3.org/2001/XMLSchema",
> > > or is it none (as targetNamespace is not provided)?
> > >
> > > Thanks in advance.
> > >
> > >
> > > <?xml version ="1.0"?>
> > > <schema xmlns="http://www.w3.org/2001/XMLSchema" >
> > >
> > >   <element name = "envelope">
> > >     <complexType>
> > >       <sequence>
> > >         <element ref = "documentBody"/>
> > >       </sequence>
> > >     </complexType>
> > >   </element>
> > >
> > >   <element name = "documentBody" type="anyType"/>
> > >
> > > </schema>
> > >
> > > -Takuki Kamiya
> > >
> > >
> > >
> > > -----------------------------------------------------------------
> > > 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://lists.xml.org/ob/adm.pl>
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > -----------------------------------------------------------------
> > 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://lists.xml.org/ob/adm.pl>
> >
>
>
> -----------------------------------------------------------------
> 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://lists.xml.org/ob/adm.pl>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.