I don't think having a namespace at the mapping level should prevent you from specifying a namespace for individual elements


Stefano Fornari wrote:

Hi Kai,
Thanks for the hint; unfortunately it does not work because we have already a ns defined on the mapping level and we can't use prefixes. What we probably need, would be that we could put <namespace> in the context of a structure, instead of an element. Currently, if we try that option, JiBX complains with error. But it could be a nice feature IMO.


Stefano

Kai Peter Nacke wrote:

Hi,
I think

<namespace uri="syncml:metinf" default="none" />
<mapping name="Meta" class="sync4j.framework.core.Meta"
ordered="false">
<value name="Format" ns="syncml:metinf" field="format"
usage="optional"/>
<value name="Type" ns="syncml:metinf" field="type" usage="optional"/>
</mapping>


should work.

Kai


[EMAIL PROTECTED] 01.07.2004 11:07 >>>


Hi,

I have this mapping

<mapping name="Meta" class="sync4j.framework.core.Meta"
ordered="false">
    <value name="Format"  field="format" usage="optional"/>
    <value name="Type"     field="type"   usage="optional"/>
</mapping>

How can I add namespace declaration to get the following result when I
marshalling?

<Meta>
    <Format xmlns="syncml:metinf">format</Format>
    <Type    xmlns="syncml:metinf">type</Type>
</Meta>


If I write <mapping name="Meta" class="sync4j.framework.core.Meta"
ordered="false">
<namespace uri="syncml:metinf" default="elements" />


    <value name="Format"  field="format" usage="optional"/>
    <value name="Type"     field="type"   usage="optional"/>
</mapping>

then I get this result that is not correct for me

<Meta xmlns="syncml:metinf">
    <Format>format</Format>
    <Type>type</Type>
</Meta>


Thanks in advanced Bye Luigia


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users







-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to