You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by youhaodeyi <yo...@gmail.com> on 2009/09/22 07:19:48 UTC

How can I use xmlbeans on multiple schema files?

I have two schema files in different namespace. In the following example, the
tcp is defined in another schema file. How can I get the tcp:connector from
RootDocument class?

<root>
    <connector name="connector" />
    <tcp:connector name="tcp_connector" />
</root>
-- 
View this message in context: http://www.nabble.com/How-can-I-use-xmlbeans-on-multiple-schema-files--tp25530569p25530569.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


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


Re: How can I use xmlbeans on multiple schema files?

Posted by Tuatha <43...@keme.co.uk>.
I have a similar issue.  One Schema (that I don't control) with 99% of all
element/attrib definitions + 1 <anyAttribute> line added in to enable
extensions.  I have a custom XSD with some attributes defined (in a
different namespace, 'sfbu').  xmlbeans generated some Java and classes + I
have API docs but can't work out how to link/jump from one namespace to the
other.

My code can access all the main attribs via the generated getters (e.g.
getPARAMNAME() ) and I now can see getters for the custom XSD (e.g.
getMinValue () ) but how do I call the new getters with the right
context/data to access the custom attributes?

eg 
            <PARAM_DEFINITION PARAM_NAME="PD1" PARAM_TYPE="string"
sfbu:EnumList="bronze,Silver,GOLD,a_b-c,a12" />
            <PARAM_DEFINITION PARAM_NAME="PD2" PARAM_TYPE="number"
sfbu:MinValue="1" sfbu:MaxValue="5" />
            <PARAM_DEFINITION PARAM_NAME="PD3" PARAM_TYPE="number"
sfbu:EnumList="10,100,1000,32765" />


youhaodeyi wrote:
> 
> I have two schema files in different namespace. In the following example,
> the tcp is defined in another schema file. How can I get the tcp:connector
> from RootDocument class?
> 
> <root>
>     <connector name="connector" />
>     <tcp:connector name="tcp_connector" />
> </root>
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-use-xmlbeans-on-multiple-schema-files--tp25530569p25706435.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


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