Hi Luis,

Have you tried enabling the generate-synthetic-annotations [1] feature?
That should generate an XSAnnotation for each schema component (e.g.
XSElementDeclaration) with non-schema attributes but no xs:annotation
children.

Thanks.

[1]
http://xerces.apache.org/xerces-c/program-sax2-3.html#GenerateSyntheticAnnotations

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: [email protected]
E-mail: [email protected]

Luis Rodriguez <[email protected]> wrote on 02/01/2012 06:41:14 PM:

> Hi everyone!
>
> I have a problem trying to get some information from a Schema file. I got
> this schema:
>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>             xmlns:csx="http://xmlns.oracle.com/2004/CSX";
>             targetNamespace="http://www.opencsx.org/schema";
>             elementFormDefault="qualified">
> <xsd:element name="Employee" csx:propertyID="1234">
>   <xsd:complexType>
>     <xsd:annotation>
>       <xsd:appinfo>
>         <csx:kidList sequential="true">
>           <csx:kid propertyID="3456" kidNum="1"/>
>           <csx:kid propertyID="3457" kidNum="2"/>
>         </csx:kidList>
>       </xsd:appinfo>
>     </xsd:annotation>
>     <xsd:sequence>
>       <xsd:element name="Name" type="xsd:string" csx:propertyID="3456"/>
>       <xsd:element name="Salary" type="xsd:int" csx:propertyID="3457"/>
>     </xsd:sequence>
>   </xsd:complexType>
> </xsd:element>
> </xsd:schema>
>
> And I got the XSElementDeclaration item from Xerces that represents the
> Employee element in this case, the problem here is that I don't know how
to
> extract the csx:propertyID attribute and the appinfo annotation. Anyone
> knows what API can I use to get them?
>
> Thanks,
> Luis.
>
> --
>
> "The significant problems we face cannot be solved by the same level of
> thinking that created them."  -- Albert Einstein

Reply via email to