You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Ajith Ranabahu <aj...@gmail.com> on 2006/03/31 12:45:33 UTC
[XMLSchema] handling of unqualified type names
Hi all,
I've been troubled by a certain behavior in XmlSchema and wanted to
clarify it here. So here goes!
When a schema has types that are not qualified what should be taken as
their namespace ? Lemme explain the problem by an example. The
following schema has unqualified types
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://soapinterop.org/xsd"
targetNamespace="http://soapinterop.org/xsd"
elementFormDefault="qualified">
<element name="complexElt">
<complexType>
<sequence>
<element name="name" type="string"/>
<element name="age" type="int"/>
</sequence>
</complexType>
</element>
</schema>
XMLSpy picks up the string as xs:string interpreting the unqualified
types as belonging to the XMLnamespace. XmlSchema thinks that all such
unqualified type names as belonging to the target namespace and fails
to process the above schema.
Which is the correct logic here ? I can't seem to find a concrete
statement about this in the schema spec also!
--
Ajith Ranabahu
Re: [XMLSchema] handling of unqualified type names
Posted by Ajith Ranabahu <aj...@gmail.com>.
Fixed and commited. I've already added a Jira and resolved it to so
that we've a record of it
On 4/1/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> +1 to correcting the behavior - default NS applies here!
>
> Sanjiva.
>
> On Sat, 2006-04-01 at 10:50 +0600, Ajith Ranabahu wrote:
> > Hi Lawrence,
> > I am actually set to fix the thing and I've even figured out the exact
> > place to fix :) I just wanted to clarify the behavior. I'll anyway
> > report a Jira so that there is a record of what we did.
> >
> > Ajith
> >
> >
> >
> > On 3/31/06, Lawrence Mandel <lm...@ca.ibm.com> wrote:
> > > In this case the default namespace is declared to be the XML schema
> > > namespace
> > > xmlns="http://www.w3.org/2001/XMLSchema"
> > > So string and int must be in the XML schema namespace, which they are. To
> > > me your experience suggests a bug in XmlSchema. Care to open a Jira report
> > > so we can get this fixed?
> > >
> > > Thanks,
> > >
> > > Lawrence Mandel
> > >
> > >
> > >
> > >
> > > "Ajith Ranabahu" <aj...@gmail.com>
> > > 03/31/2006 05:45 AM
> > > Please respond to
> > > commons-dev@ws.apache.org
> > >
> > >
> > > To
> > > commons-dev@ws.apache.org
> > > cc
> > >
> > > Subject
> > > [XMLSchema] handling of unqualified type names
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi all,
> > > I've been troubled by a certain behavior in XmlSchema and wanted to
> > > clarify it here. So here goes!
> > >
> > > When a schema has types that are not qualified what should be taken as
> > > their namespace ? Lemme explain the problem by an example. The
> > > following schema has unqualified types
> > >
> > > <schema xmlns="http://www.w3.org/2001/XMLSchema"
> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > xmlns:xsd1="http://soapinterop.org/xsd"
> > > targetNamespace="http://soapinterop.org/xsd"
> > > elementFormDefault="qualified">
> > > <element name="complexElt">
> > > <complexType>
> > > <sequence>
> > > <element
> > > name="name" type="string"/>
> > > <element
> > > name="age" type="int"/>
> > > </sequence>
> > > </complexType>
> > > </element>
> > > </schema>
> > >
> > > XMLSpy picks up the string as xs:string interpreting the unqualified
> > > types as belonging to the XMLnamespace. XmlSchema thinks that all such
> > > unqualified type names as belonging to the target namespace and fails
> > > to process the above schema.
> > >
> > > Which is the correct logic here ? I can't seem to find a concrete
> > > statement about this in the schema spec also!
> > >
> > > --
> > > Ajith Ranabahu
> > >
> > >
> > >
> >
> >
> > --
> > Ajith Ranabahu
>
>
--
Ajith Ranabahu
Re: [XMLSchema] handling of unqualified type names
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
+1 to correcting the behavior - default NS applies here!
Sanjiva.
On Sat, 2006-04-01 at 10:50 +0600, Ajith Ranabahu wrote:
> Hi Lawrence,
> I am actually set to fix the thing and I've even figured out the exact
> place to fix :) I just wanted to clarify the behavior. I'll anyway
> report a Jira so that there is a record of what we did.
>
> Ajith
>
>
>
> On 3/31/06, Lawrence Mandel <lm...@ca.ibm.com> wrote:
> > In this case the default namespace is declared to be the XML schema
> > namespace
> > xmlns="http://www.w3.org/2001/XMLSchema"
> > So string and int must be in the XML schema namespace, which they are. To
> > me your experience suggests a bug in XmlSchema. Care to open a Jira report
> > so we can get this fixed?
> >
> > Thanks,
> >
> > Lawrence Mandel
> >
> >
> >
> >
> > "Ajith Ranabahu" <aj...@gmail.com>
> > 03/31/2006 05:45 AM
> > Please respond to
> > commons-dev@ws.apache.org
> >
> >
> > To
> > commons-dev@ws.apache.org
> > cc
> >
> > Subject
> > [XMLSchema] handling of unqualified type names
> >
> >
> >
> >
> >
> >
> > Hi all,
> > I've been troubled by a certain behavior in XmlSchema and wanted to
> > clarify it here. So here goes!
> >
> > When a schema has types that are not qualified what should be taken as
> > their namespace ? Lemme explain the problem by an example. The
> > following schema has unqualified types
> >
> > <schema xmlns="http://www.w3.org/2001/XMLSchema"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:xsd1="http://soapinterop.org/xsd"
> > targetNamespace="http://soapinterop.org/xsd"
> > elementFormDefault="qualified">
> > <element name="complexElt">
> > <complexType>
> > <sequence>
> > <element
> > name="name" type="string"/>
> > <element
> > name="age" type="int"/>
> > </sequence>
> > </complexType>
> > </element>
> > </schema>
> >
> > XMLSpy picks up the string as xs:string interpreting the unqualified
> > types as belonging to the XMLnamespace. XmlSchema thinks that all such
> > unqualified type names as belonging to the target namespace and fails
> > to process the above schema.
> >
> > Which is the correct logic here ? I can't seem to find a concrete
> > statement about this in the schema spec also!
> >
> > --
> > Ajith Ranabahu
> >
> >
> >
>
>
> --
> Ajith Ranabahu
Re: [XMLSchema] handling of unqualified type names
Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi Lawrence,
I am actually set to fix the thing and I've even figured out the exact
place to fix :) I just wanted to clarify the behavior. I'll anyway
report a Jira so that there is a record of what we did.
Ajith
On 3/31/06, Lawrence Mandel <lm...@ca.ibm.com> wrote:
> In this case the default namespace is declared to be the XML schema
> namespace
> xmlns="http://www.w3.org/2001/XMLSchema"
> So string and int must be in the XML schema namespace, which they are. To
> me your experience suggests a bug in XmlSchema. Care to open a Jira report
> so we can get this fixed?
>
> Thanks,
>
> Lawrence Mandel
>
>
>
>
> "Ajith Ranabahu" <aj...@gmail.com>
> 03/31/2006 05:45 AM
> Please respond to
> commons-dev@ws.apache.org
>
>
> To
> commons-dev@ws.apache.org
> cc
>
> Subject
> [XMLSchema] handling of unqualified type names
>
>
>
>
>
>
> Hi all,
> I've been troubled by a certain behavior in XmlSchema and wanted to
> clarify it here. So here goes!
>
> When a schema has types that are not qualified what should be taken as
> their namespace ? Lemme explain the problem by an example. The
> following schema has unqualified types
>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsd1="http://soapinterop.org/xsd"
> targetNamespace="http://soapinterop.org/xsd"
> elementFormDefault="qualified">
> <element name="complexElt">
> <complexType>
> <sequence>
> <element
> name="name" type="string"/>
> <element
> name="age" type="int"/>
> </sequence>
> </complexType>
> </element>
> </schema>
>
> XMLSpy picks up the string as xs:string interpreting the unqualified
> types as belonging to the XMLnamespace. XmlSchema thinks that all such
> unqualified type names as belonging to the target namespace and fails
> to process the above schema.
>
> Which is the correct logic here ? I can't seem to find a concrete
> statement about this in the schema spec also!
>
> --
> Ajith Ranabahu
>
>
>
--
Ajith Ranabahu
Re: [XMLSchema] handling of unqualified type names
Posted by Lawrence Mandel <lm...@ca.ibm.com>.
In this case the default namespace is declared to be the XML schema
namespace
xmlns="http://www.w3.org/2001/XMLSchema"
So string and int must be in the XML schema namespace, which they are. To
me your experience suggests a bug in XmlSchema. Care to open a Jira report
so we can get this fixed?
Thanks,
Lawrence Mandel
"Ajith Ranabahu" <aj...@gmail.com>
03/31/2006 05:45 AM
Please respond to
commons-dev@ws.apache.org
To
commons-dev@ws.apache.org
cc
Subject
[XMLSchema] handling of unqualified type names
Hi all,
I've been troubled by a certain behavior in XmlSchema and wanted to
clarify it here. So here goes!
When a schema has types that are not qualified what should be taken as
their namespace ? Lemme explain the problem by an example. The
following schema has unqualified types
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://soapinterop.org/xsd"
targetNamespace="http://soapinterop.org/xsd"
elementFormDefault="qualified">
<element name="complexElt">
<complexType>
<sequence>
<element
name="name" type="string"/>
<element
name="age" type="int"/>
</sequence>
</complexType>
</element>
</schema>
XMLSpy picks up the string as xs:string interpreting the unqualified
types as belonging to the XMLnamespace. XmlSchema thinks that all such
unqualified type names as belonging to the target namespace and fails
to process the above schema.
Which is the correct logic here ? I can't seem to find a concrete
statement about this in the schema spec also!
--
Ajith Ranabahu