xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radu Preotiuc-Pietro" <ra...@bea.com>
Subject RE: problem getting annotation on refed element
Date Fri, 01 Sep 2006 21:49:06 GMT
This is one of the things that's up in the air in XMLSchema, as far as
I'm aware, what happens with annotations on refs to elements/attributes.
Because of that we just picked one approach until this becomes clearer.
The approach that we picked was that the annotation be part of the
reference and not an "addition" to the reference (hope you understand
what I mean).

So I guess you could modify your Schema, if that's an option, to use
local elements instead of refs or you can use the XmlBeans for
Schema4Schemas (the org.apache.xmlbeans.impl.xb.xsdschema package) to
get the Schema as XML or, well, patch the code to do what you want ;-)!

Radu 

-----Original Message-----
From: Pavel Kryl [mailto:pavelkryl@gmail.com] 
Sent: Friday, September 01, 2006 12:20 AM
To: user@xmlbeans.apache.org
Subject: problem getting annotation on refed element

I am using your framework for examining XML schema structure. When I
want to get an annotation of refed element, I do not get it. Instead I
get the annotation of referenced element. Here is the annotation I want
to get (using SchemaLocalElement.getAnnotation()):

          <xsd:element ref="tns:imports">
             <xsd:annotation>
     	       <xsd:appinfo>blabalbal</xsd:appinfo>
             </xsd:annotation>
	  </xsd:element>

But instead it returns:

   <xsd:element name="imports">
             <xsd:annotation>
     	       <xsd:appinfo>blebelbel</xsd:appinfo>
             </xsd:annotation>
   </xsd:element>

I cannot find a way to get the former annotation, can you help me?

Thanks, pavel

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Mime
View raw message