Hi Elisha,

Hate to be the bearer of bad news, but this is a recognized problem.  The 
problem doesn't, however, lie with Xerces-C's implementation (Xerces-J 
does the same thing); the designers of XML Schema forgot to leave a place 
in any component where such annotations could be hung off of.  Note that 
the XSElementDeclaration isn't an appropriate place, since it's the 
declaration, and is shared among all references (as well as at the global 
level).
 
I believe there are plans to fix this for XML Schema 1.1 (e-mail the 
Schema comments list if you wish to support that idea). 

Cheers,
Neil
Neil Graham
Manager, XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]





"Elisha Berns" <[EMAIL PROTECTED]> 
07/29/2005 02:44 PM
Please respond to
c-dev


To
"Xerces C++ Development" <[email protected]>
cc

Subject
Apparent bug with the XSElementDecl::getAnnotations() API






Can someone explain why this happens:

In the ebXML schemas there a lot of annotations in this style:

     <xsd:element ref="cbc:Note" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>
            <ccts:Component>
              <ccts:ComponentType>BBIE</ccts:ComponentType>
              <ccts:DictionaryEntryName>Order. Note.
Text</ccts:DictionaryEntryName>
              <ccts:Definition>contains any free form text pertinent to
the entire document or to the document message itself. This element may
contain notes or any other similar information that is not contained
explicitly in another structure.</ccts:Definition>
              <ccts:Cardinality>0..1</ccts:Cardinality>
              <ccts:ObjectClass>Order</ccts:ObjectClass>
              <ccts:PropertyTerm>Note</ccts:PropertyTerm>
              <ccts:RepresentationTerm>Text</ccts:RepresentationTerm>
              <ccts:DataType>Text. Type</ccts:DataType>
            </ccts:Component>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>

This element is part of a sequence particle of a complexType.  The ref'd
element type does not have any annotation element, but here an
annotation is added on.  In all similar cases the
XSElementDecl::getAnnotation() does not retrieve any XSAnnotation, even
though, as you plainly see, it's right there.
Just FYI, I get the XSElementDecl from the XSParticle.

So what's the issue here, and what can I do to get the annotation?

Thanks,

Elisha Berns
[EMAIL PROTECTED]
tel. (310) 556 - 8332
fax (310) 556 - 2839




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




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

Reply via email to