You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/02/01 19:46:49 UTC
DO NOT REPLY [Bug 6188] New: -
using schemaLocation cause anonymous types not working.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6188>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6188
using schemaLocation cause anonymous types not working.
Summary: using schemaLocation cause anonymous types not working.
Product: Xerces-J
Version: 1.4.4
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: Build
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: paulhnguyen@hotmail.com
When I use schemaLocation with default target namespace in xml document, the
DOMParser failed in validating the xml file defined with anonymous element
types. But when I convert the anonymous type to reference the named type then
it's working.
Ex:
Java Code:
1) parser.setProperty("http://apache.org/xml/properties/schema/external-
schemaLocation", "http://mynamespace myschema.xsd");
2) parser.parse("c://myfile.xml");
myfile.xml (parser used: org.apache.xerces.parsers.DOMParser):
<?xml version="1.0" ?>
<vfyPasswordRequest xmlns="http://mynamespace">
<verifyPassword>abc</verifyPassword>
</vfyPasswordRequest>
myschema.xsd (with anonymous type):
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://mynamespace" targetNamespace="http://mynamespace" >
<xsd:element name="vfyPasswordRequest" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="verifyPassword" >
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="8" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!--
<xsd:element name="verifyPassword">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="8" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
-->
</xsd:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org