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 Gareth Reakes <ga...@decisionsoft.com> on 2002/05/14 17:24:06 UTC
Validation Bug? was RE: DOM_Node::getPrefix() always returns NULL
Apart from the prefix returning null problem that is being discussed I
think Ive come across a bug.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:my="http://david.com/david-schema"
targetNamespace="http://david.com/david-schema"
elementFormDefault="qualified"
>
<xs:element name="addressbook">
<xs:complexType>
<xs:sequence>
<xs:element ref="my:person" minOccurs='1' maxOccurs='1'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="person" type="xs:string"/>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<my:addressbook xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:my="http://david.com/david-schema"
xsi:schemaLocation="http://david.com/david-schema
david3.xsd">
<person>David</person>
</my:addressbook>
My understanding is that person should be prefixed because
elementFormDefault="qualified". Xerces J does indeed fail this file.
This occurs in the nightly build as well as 1.7
Gareth
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
RE: Validation Bug? was RE: DOM_Node::getPrefix() always returns NULL
Posted by David Cleary <da...@progress.com>.
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:my="http://david.com/david-schema"
> targetNamespace="http://david.com/david-schema"
> elementFormDefault="qualified"
> >
>
> <xs:element name="addressbook">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="my:person" minOccurs='1' maxOccurs='1'/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> <xs:element name="person" type="xs:string"/>
>
> </xs:schema>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <my:addressbook xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:my="http://david.com/david-schema"
> xsi:schemaLocation="http://david.com/david-schema
> david3.xsd">
>
> <person>David</person>
> </my:addressbook>
>
>
>
> My understanding is that person should be prefixed because
> elementFormDefault="qualified". Xerces J does indeed fail this file.
person should be prefixed, but it has nothing to do with elementFormDefault.
Since person is a global element referenced by addressbook, it will always
be a qualified element.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org