You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Jan Torben Heuer <jt...@mail2003.dnsalias.org> on 2008/01/08 13:59:26 UTC
map namespaces and ignore schemaLocation
Hi,
can I map namespaces to another string and ignore the schemaLocation?
I have:
<import namespace="http://www.opengis.net/swe/1.0.1"
schemaLocation="http://schemas.opengis.net/sweCommon/1.0.1/swe.xsd"/>
and I want to have:
<import namespace="http://www.opengis.net/swe/1.0.0"
schemaLocation="http://schemas.opengis.net/sweCommon/1.0.1/swe.xsd"/>
I could change the schema, but I'd prefer a general soloution, because it is
easier to maintain.
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: map namespaces and ignore schemaLocation
Posted by Azfar Kazmi <az...@gmail.com>.
Sure, you can, using xsdconfig file. See
http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html
Azfar
On Jan 8, 2008 4:59 AM, Jan Torben Heuer <jt...@mail2003.dnsalias.org>
wrote:
> Hi,
>
> can I map namespaces to another string and ignore the schemaLocation?
>
> I have:
>
> <import namespace="http://www.opengis.net/swe/1.0.1"
> schemaLocation="http://schemas.opengis.net/sweCommon/1.0.1/swe.xsd"/>
>
> and I want to have:
> <import namespace="http://www.opengis.net/swe/1.0.0"
> schemaLocation="http://schemas.opengis.net/sweCommon/1.0.1/swe.xsd"/>
>
> I could change the schema, but I'd prefer a general soloution, because it
> is
> easier to maintain.
>
>
> Jan
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
Re: map namespaces and ignore schemaLocation
Posted by Jacob Danner <ja...@gmail.com>.
Hi Jan,
Have you thought about 'pre-processing' the instances before using the
specific types.
In other words, scomp the schema you want using the namespace you want.
Then, when creating your instance, try
XmlObject xo = // create instance via parse/newInstance
XmlCursor xc = xo.newCursor();
xc... // navigate to NS declaration
// change NS declaration to the one you want
// cast to the type you want
Hope this helps,
-jacobd
On Jan 8, 2008 4:59 AM, Jan Torben Heuer <jt...@mail2003.dnsalias.org>
wrote:
> Hi,
>
> can I map namespaces to another string and ignore the schemaLocation?
>
> I have:
>
> <import namespace="http://www.opengis.net/swe/1.0.1"
> schemaLocation="http://schemas.opengis.net/sweCommon/1.0.1/swe.xsd"/>
>
> and I want to have:
> <import namespace="http://www.opengis.net/swe/1.0.0"
> schemaLocation="http://schemas.opengis.net/sweCommon/1.0.1/swe.xsd"/>
>
> I could change the schema, but I'd prefer a general soloution, because it
> is
> easier to maintain.
>
>
> Jan
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
--
I'm competing in a Half-Ironman distance triathlon to raise money for the
fight against cancer!
Please help support my efforts by going to:
http://www.active.com/donate/tntwaak/jacobd