You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Elisha Berns <e....@computer.org> on 2005/08/02 23:10:31 UTC

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

Hi Neil,

Thanks for the response.  Well, I'll be sure the add my 5 cents on the
XML Schema comments mailing list.  By the way, since I'm not sure which
list that is, do you have the correct email address for it just so I can
be sure I'm posting to where you recommend?

On this note of posting to the schema comments list, I do have another
question that is sure to annoy you ~:)  Many weeks ago I asked several
times about Xerces not treating model group instances inside of
compleType definitions as a definable type, rather the type information
becomes *invisible* at that point, and you said well, that's how the
Xerces team interprets that standard.  And it would appear that other
implementors of the schema object model interpret that point
differently, notably, Microsoft in their .NET .Xml.SchemaModel (or
whatever namespace it may be) schema parser/object model treat it as a
defined type even at that point.  So whomever is *correct* here (both
versions apparently at this point), doesn't it seem that this is also a
fine point that needs to be made more abundantly clear so there is more
*agreement/conformity* among implementations?

The main point for me, as a lowly developer, is that I really detest the
idea of having/needing to support more than one implementation because
they interpret the standard differently!  If every *major*
implementation interprets the standard similarly it sure makes life
easier.

What say you?

Elisha

> 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:  neilg@ca.ibm.com
> 
> 
> 
> 
> 
> "Elisha Berns" <e....@computer.org>
> 07/29/2005 02:44 PM
> Please respond to
> c-dev
> 
> 
> To
> "Xerces C++ Development" <c-...@xerces.apache.org>
> 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
> e.berns@computer.org
> tel. (310) 556 - 8332
> fax (310) 556 - 2839
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org




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