xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikhil Dinesh <nikh...@seas.upenn.edu>
Subject Elements from imported namespaces
Date Fri, 09 Jul 2004 01:53:57 GMT

Im referencing a global element from an imported namespace in my schema.
But when I read an instance in, the referenced element takes the type
XmlAnyType instead of the correct one. The schema looks like:

<schema xmlns:target="http://bar.com"

  <import namespace="http://foo.com" schemaLocation="..." />

  <complexType name="BarType" >
      <element ref="foo:FooElement" minOccurs="1" maxOccurs="1" />
      <element name="Bar" type="target:BarType" minOccurs="0" maxOccurs="unbounded" />


Reading in a FooElementDocument works fine with the elements taking their
appropriate types. But reading a BarType document results in the
FooElements having XmlAnyType.

Ive tried putting the FooElement in both namespaces and setting an
ErrorListener with the validateOnSet option. But no errors are flagged and
behaviour is the same whichever I choose. Im reading the document in by
messaging the SAXHandler.

Any suggestions as to what I might be doing wrong?

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/

View raw message