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 Eric Ye <er...@locus.apache.org> on 2000/10/23 21:44:01 UTC

Re: Am I supposed to be able to do this yet?

The "Child" element is declared as a locally scoped element inside an
anonymous complex type, and the elementFormDefault attribute of the "schema"
element in the "sch.xsd" is "unqualified", so the Child element will be
given a unqulified name (null, Child). However in your document, you have
xmlns="http://wbradney/sch.xsd" in the "Root" element start tag, so the
"Child" element will be resolved as ("http://wbradney//sch.xsd", "Child"),
which does not match the one you declared in the "sch.xsd", that is why the
parse complained about Child not declared.
_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org

----- Original Message -----
From: "Wayne Bradney" <Wa...@WallStreetSystems.com>
To: <er...@locus.apache.org>
Sent: Thursday, October 19, 2000 3:44 PM
Subject: Am I supposed to be able to do this yet?


> Eric,
>
> Pardon the intrusion, but what might I be doing wrong here?
>
>  <<sch.xsd>>  <<bodysch.xsd>>  <<testb.xml>>
>
> Command: java SAXCount -v testb.xml
>
> Result:
> [Error] testb.xml:8:10: Element type "Child" must be declared.
> [Error] testb.xml:9:10: The content of element type "Root" must match
> "(Child)".
> testb.xml: 681 ms (3 elems, 6 attrs, 8 spaces, 3 chars)
>
> Thanks in advance,
> Wayne M. Bradney
> Wall Street Systems, Inc.
> 30 Broad Street, 25th Floor
> New York, NY 10004
> Phone:   +1 (212) 809 7200
> E-Mail:    Wayne.Bradney@WallStreetSystems.com
>
>
>