/Bjarke Buur Mortensen/:
I have two element declarations (a local and a top-level) looking like
this (one is a ref to the other):
<xsd:element name="date" type="xsd:date">
<xsd:annotation>
<xsd:documentation>date</xsd:documentation>
</xsd:annotation>
</xsd:element>
...
<xsd:sequence>
<xsd:element ref="date">
<xsd:annotation>
<xsd:documentation>dateref</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
...
Note, you have only a top-level declaration, the <element ref="..."
/> is just a construct to refer to it in the serialized schema form
and additionally represents a particle component.
A call to getAnnotation() on the local element declaration gives me the
annotation for the global element. It seems to me that there is no way
for me to access the local annotation for the nested element declaration
using the Schema API.
Am I correct, and if so, is it a bug or simply the way it is supposed to
work? (I'll grant that an annotation on a element declaration with a ref
is somewhat unconventional, but still, it _is_ a valid schema)
The problem is related to the component model the XML Schema
specification describes. There were questions regarding the same
issue before:
http://marc.theaimsgroup.com/?l=xerces-j-user&m=111946626002673
http://marc.theaimsgroup.com/?l=xerces-j-user&m=109886608611629
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]