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 Bjoern Martin <ma...@fh-karlsruhe.de> on 2001/04/03 14:43:12 UTC

Duplicate element decl in the same scope

Hi everybody.

Part of a schema definition i wrote looks like this:

<xsd:choice>
  <xsd:element name="published" type="xsd:date"/>
  <xsd:element name="published">
    <xsd:complexType>
      <xsd:complexContent>
        <xsd:restriction base="xsd:anyType">
        </xsd:restriction>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>
</xsd:choice>

What it should do is allowing me to use one of the two definitions 
of <published> (the first representing a date, the latter empty). 
When I parse a file using this schema, the parser displays this 
error:

Schema error: duplicate element decl in the same scope : published.

My understanding of the element <xsd:choice> is that it should take 
only one of the two, and for that the definition should be correct.
I would appreciate any help. Thx!

Bye,

Bjoern Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Empty namespaces

Posted by Anatoliy Salistra <as...@Sailfish.Com>.
Here's a problem. Very simple XML:
<?xml version='1.0' encoding='UTF-8'?>
<el1>
    <el2>Text</el2>
</el1>

If, after parsing (Xerces1.3.1 DOMParser) I ask for the namespace of the
document (getNamespaceURI) the answer is 'null', as it should be according
to the method's description in the API. However if I go on to ask about
namespaces of the subelements, I get empy strings ''.
I would discard the whoe problem as my own ignorance of namespaces (which I
readily admit), but this problem seems to break SOAP: when SOAP server
returns a <Fault> client fails to unmarshall it - <faultcode> inside it
produces an empty namespace, whereas only standard SOAP or null namespaces
are allowed.

Thanks for comments.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org