Hi Umesh,
the 'lax' setting is lost when the namespace list contains more than
2 choices (regardless if it's a ##targetNamespace or a fixed URI); I
have committed a fix for this bug.
Alberto
At 09.56 26/07/2007 +0530, Umesh Chandak wrote:
Hi Alberto,
Thanks for your reply. My comment is inline.
On Wed, 2007-07-25 at 15:57 +0200, Alberto Massari wrote:
> Hi Umesh,
> I tried your testcase with Xerces 2.7, and it reports an error
> ('unknown element bar:bar'; which version are you using?
>
> Alberto
>
> At 18.58 25/07/2007 +0530, Umesh Chandak wrote:
> >Hi All,
> > Is there any precedence between processContent = strict and namespace
> >attribute of wildcard group.
> >Consider for example
> >**************XSD File *******************
> >
> ><?xml version="1.0"?>
> ><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >targetNamespace="http://xsdtesting" xmlns:x="http://xsdtesting"
> >elementFormDefault="qualified">
> > <xsd:element name="doc">
> > <xsd:complexType>
> > <xsd:sequence>
> > <xsd:element name="elem" type="x:any"
> >minOccurs="0" maxOccurs="100"/>
> > </xsd:sequence>
> > </xsd:complexType>
> > </xsd:element>
> > <xsd:complexType name="any">
> > <xsd:choice>
> > <xsd:any processContents="strict" namespace="foo
> >bar ##targetNamespace" minOccurs="0" maxOccurs="100"/>
It's my mistake. Here processContents="lax". But
xsWildcard::getProcessContents returns me PC_STRICT and this occurs
because of ##targetNamespace in the namespace list. If I remove the
##targetNamespace then it gives me PC_LAX. I think this is the bug in
xerces. You can try SCMPrint sample programs to observe this behaviour.
Please let me know whether this is the expected behaviour or bug in
Xerces. My version of xerces is 2.7
Thanks.
Regards,
Umesh
> > </xsd:choice>
> > </xsd:complexType>
> > <xsd:element name="foo"/>
> ></xsd:schema>
> >*******************XSD End **************************
> >*******************XML File *************************
> ><?xml version="1.0"?>
> ><x:doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >xmlns:x="http://xsdtesting" xsi:schemaLocation="http://xsdtesting
> >particlesC029.xsd">
> > <x:elem>
> > <bar:bar xmlns:bar="bar"/>
> > </x:elem>
> ></x:doc>
> >********************XML END*****************************
> >1) If we go according to strict then xml is invalid because there is no
> >definition for 'bar:bar' element
> >2) If we go according to the namespace then it's valid because bar
> >element is from the list of namespaces 'foo bar http://xsdtesting'
> >
> >Xerces says that this is the Valid instance i.e. it is going according
> >to namespace .
> >Please let me know if there is any such precedence followed in xerces.
> >If possible please give the reference because in spec I didn't find
> >anything regarding such precedence.
> >
> >Thanks.
> >Regards,
> >Umesh
>
>
--
Umesh Chandak <[EMAIL PROTECTED]>