I have two sample schemas; the first with an element that accepts
any element from any namespace as its child.  When I try to
place an element from the second schema in it, I get the 
following error with Xerces-J 1.3.1:

$ java dom.DOMCount -v any.xml
[Error] any.xml:17:21: The content of element type "any1:acceptAny" must match 
"##any:uri=http://any1.com*";.
any.xml: 450 ms (5 elems, 7 attrs, 26 spaces, 53 chars)
$

When using Xerces-J 1.3.0, it works fine:

$ java dom.DOMCount -v any.xml
any.xml: 398 ms (5 elems, 7 attrs, 26 spaces, 53 chars)
$


I've included the sample files.  Am I doing or assuming something wrong?

-andy

-- 
Andrew Newton
[EMAIL PROTECTED]
<?xml version="1.0"?>
<any1 xmlns="http://any1.com";
      xmlns:any1="http://any1.com";
      xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";
      xsi:schemaLocation="http://any1.com any1.xsd" >

  <any1:acceptAny>
    <any1:uriTest>http://example.com/</any1:uriTest>
  </any1:acceptAny>

  <any1:acceptAny>
    <any2:someElement xmlns="http://any2.com";
        xmlns:any2="http://any2.com";
        xsi:schemaLocation="http://any2.com any2.xsd" >
        ELEMENT CONTENT HERE
    </any2:someElement>
  </any1:acceptAny>

</any1>
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2000/10/XMLSchema";
        xmlns:any1="http://any1.com";
        targetNamespace="http://any1.com";
        elementFormDefault="qualified" >

  <annotation>
    <documentation>
      a test for any element conformance
    </documentation>
  </annotation>

  <element name="any1">
    <complexType>
      <choice minOccurs="0" maxOccurs="unbounded">
        <element ref="any1:acceptAny"/>
        <element ref="any1:uriTest" />
      </choice>
    </complexType>
  </element>

  <element name="acceptAny">
    <complexType>
      <sequence>
        <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
      </sequence>
    </complexType>
  </element>

  <element name="uriTest" type="uriReference" />
</schema>

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2000/10/XMLSchema";
        xmlns:test="http://any2.com";
        targetNamespace="http://any2.com";
        elementFormDefault="qualified" >

  <annotation>
    <documentation>
      a test for any element conformance
    </documentation>
  </annotation>

  <element name="someElement" type="string" />
</schema>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to