|
Hi
I'm not too sure if this is a bug - I have a simple
schema, and if I parse the schema and begin to traverse down through the
schemagrammer, I get to the first complexType. Xerces tells me that the element
"responsemodel" is a XSElementDecl.SCOPE_GLOBAL. Is this correct? Surely it
should be a XSElementDecl.SCOPE_LOCAL? As a consequence, I cannot get the
complexType.
I'm using the latest version of xercesImpl.jar
(29-Jul-2003)
Regards
Nick
grammer =
(SchemaGrammar)preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA,
xmlInputSource);
xsNamedMap =
grammer.getComponents(XSConstants.ELEMENT_DECLARATION);
for (int i=0; i<xsNamedMap.getLength(); i++ )
{
XSElementDecl xsElementDecl = (XSElementDecl)object;
XSObject object = xsNamedMap.item(i); if
(xsElementDecl.getScope()==XSElementDecl.SCOPE_GLOBAL) {
..... etc
<?xml version="1.0"
encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified"> <xs:element name="responsemodel">
<xs:complexType>
<xs:sequence> <xs:element name="response" type="xs:string"/> <xs:element name="exceptionThrown" type="xs:boolean"/> <xs:element name="exceptionMessage" minOccurs="0" type="xs:string"/> <xs:sequence> <xs:element name="children" minOccurs="0" maxOccurs="unbounded" type="xs:string"/> </xs:sequence> <xs:element name="booleanResponse" minOccurs="0" type="xs:boolean"/> <xs:element name="byteResponse" minOccurs="0" type="xs:base64Binary"/> <xs:element name="calendarResponse" minOccurs="0" type="xs:date"/> <xs:element name="longResponse" minOccurs="0" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> |
- Re: Scope and getEnclosingCTDefinition() bug? Nick Betteridge
- Re: Scope and getEnclosingCTDefinition() bug? Maksym Kovalenko
- Re: Scope and getEnclosingCTDefinition() bug? Nick Betteridge
- Re: Scope and getEnclosingCTDefinition() bug? Sandy Gao
