Java Mailing List Archive

http://www.junlu.com/

Home » user.castor »

Re: [castor-user] issues with setting the default name space

Werner Guttmann

2012-04-13

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

Why are you trying to map one namespace uri (hl7-org:v3/voc) more than
once, i.e. to an explicit namespace prefix *and* the default namespace ?

Kind regards
Werner

On 08.04.2012 22:02, Priya B wrote:
> Below are the first few lines of the xml I get and the mapping. I do not
> understand why I am getting the empty tag for xmlns, however the other
> namespaces come fine.
>
> *_XML File :_*
>
> <ClinicalDocument xmlns:voc="urn:hl7-org:v3/voc"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"*xmlns=""*>
> <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040" />
> ---------------------------------
> -------------------------
> </ClinicalDocument>
>
> *_Mapping File:_*
> *
> *
> <mapping>
> <class name="org.abc.xyv.model.ClinicalDocument">
> <map-to xml="ClinicalDocument"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:hl7-org:v3 infrastructure/cda/CDA.xsd"
> xmlns="urn:hl7-org:v3"
> xmlns:voc="urn:hl7-org:v3/voc"/>
> <field name="typeId" type="org.telligen.patientsafety.model.TypeId">
> <bind-xml name="typeId"/>
> </field>
> -----
> -----------------
> </mapping>
>
> In my code to marshal I do Marshaller m = new Marshaller(),
> m.setNameSpace..("voc", "urn:hl7-org:v3/voc");
> setNameSpace..("","urn:hl7-org:v3/voc");
> I am expecting the output xml to have the namespace
> xmlns="urn:hl7-org:v3/voc" but I get xmlns="" but get rest of the
> declaration. Not sure what am I doing wrong?
> Thanks,
> Priya

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 junlu.com - Jax Systems, LLC, U.S.A.