You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Duncan Foo <du...@yahoo.com> on 2002/01/29 18:44:22 UTC

setDoSchema problem

Hi,

  I'm using xerces 1.5.2 under Linux. I've noticed something strange
when toggling
schemas on a DOM parser.

Take this sample document:

<foo:data xmlns="http://www.bar.org/schemas"
          xmlns:foo="http://www.foo.org/schemas"
	    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.bar.org/schemas bar.xsd">
  <test>
    <foo:blah/>
  </text>
</foo:data>

When I schemas are enabled (setDoSchem(true)) the foo:blah node will
have node
name="blah", and namespaceURI="http://www.foo.org/schemas". When schemas
are
disabled (setDoSchema(false)) the foo:blah node will have node
name="foo:blah"
and namespaceURI="http://www.foo.org/schemas". Why the difference?

Duncan


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


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: setDoSchema problem

Posted by Tinny Ng <tn...@ca.ibm.com>.
According to the DOM spec, the node name is the qualified name of the node.
Thus I believe, correct me if I am wrong, it should be "foo:blah", .

Tinny

Duncan Foo wrote:

> Hi,
>
>   Sure thing. What should the correct value of the node name be? I would
> think that it should be "blah" in each case, correct?
>
> Matthew
>
> -----Original Message-----
> From: Tinny Ng [mailto:tng-xml@ca.ibm.com]
> Sent: Wednesday, January 30, 2002 12:06 PM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: setDoSchema problem
>
> I think there is a bug in the startElement callback .... Anyway, please
> open a bugzilla bug to keep track of it.  Thanks!
>
> Tinny
>
> Duncan Foo wrote:
>
> > Hi,
> >
> >   I'm using xerces 1.5.2 under Linux. I've noticed something strange
> > when toggling schemas on a DOM parser.
> >
> > Take this sample document:
> >
> > <foo:data xmlns="http://www.bar.org/schemas"
> >           xmlns:foo="http://www.foo.org/schemas"
> >             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >           xsi:schemaLocation="http://www.bar.org/schemas bar.xsd">
> >   <test>
> >     <foo:blah/>
> >   </text>
> > </foo:data>
> >
> > When I schemas are enabled (setDoSchem(true)) the foo:blah node will
> > have node name="blah", and namespaceURI="http://www.foo.org/schemas".
> > When schemas are
> > disabled (setDoSchema(false)) the foo:blah node will have node
> > name="foo:blah"
> > and namespaceURI="http://www.foo.org/schemas". Why the difference?
> >
> > Duncan
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: setDoSchema problem

Posted by Duncan Foo <du...@yahoo.com>.
Hi,

  Sure thing. What should the correct value of the node name be? I would
think that it should be "blah" in each case, correct?

Matthew

-----Original Message-----
From: Tinny Ng [mailto:tng-xml@ca.ibm.com] 
Sent: Wednesday, January 30, 2002 12:06 PM
To: xerces-c-dev@xml.apache.org
Subject: Re: setDoSchema problem


I think there is a bug in the startElement callback .... Anyway, please
open a bugzilla bug to keep track of it.  Thanks!

Tinny

Duncan Foo wrote:

> Hi,
>
>   I'm using xerces 1.5.2 under Linux. I've noticed something strange 
> when toggling schemas on a DOM parser.
>
> Take this sample document:
>
> <foo:data xmlns="http://www.bar.org/schemas"
>           xmlns:foo="http://www.foo.org/schemas"
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:schemaLocation="http://www.bar.org/schemas bar.xsd">
>   <test>
>     <foo:blah/>
>   </text>
> </foo:data>
>
> When I schemas are enabled (setDoSchem(true)) the foo:blah node will 
> have node name="blah", and namespaceURI="http://www.foo.org/schemas". 
> When schemas are
> disabled (setDoSchema(false)) the foo:blah node will have node
> name="foo:blah"
> and namespaceURI="http://www.foo.org/schemas". Why the difference?
>
> Duncan
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


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


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: setDoSchema problem

Posted by Tinny Ng <tn...@ca.ibm.com>.
I think there is a bug in the startElement callback .... Anyway, please open
a bugzilla bug to keep track of it.  Thanks!

Tinny

Duncan Foo wrote:

> Hi,
>
>   I'm using xerces 1.5.2 under Linux. I've noticed something strange
> when toggling
> schemas on a DOM parser.
>
> Take this sample document:
>
> <foo:data xmlns="http://www.bar.org/schemas"
>           xmlns:foo="http://www.foo.org/schemas"
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:schemaLocation="http://www.bar.org/schemas bar.xsd">
>   <test>
>     <foo:blah/>
>   </text>
> </foo:data>
>
> When I schemas are enabled (setDoSchem(true)) the foo:blah node will
> have node
> name="blah", and namespaceURI="http://www.foo.org/schemas". When schemas
> are
> disabled (setDoSchema(false)) the foo:blah node will have node
> name="foo:blah"
> and namespaceURI="http://www.foo.org/schemas". Why the difference?
>
> Duncan
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org