Hi Werner,

sure. I changed my mapping:

<mapping>
        <class name="de.mde.export.jcr.magnolia.JcrProperty">
        <map-to xml="property" ns-prefix="sv"
ns-uri="http://www.jcp.org/jcr/sv/1.0"; />
        <field name="name" type="java.lang.String">
            <bind-xml QName-prefix="sv" name="sv:name"
xmlns:sv="http://www.jcp.org/jcr/sv/1.0"; node="attribute" />
        </field>
        <field name="type" type="java.lang.String">
            <bind-xml QName-prefix="sv" name="sv:type"
xmlns:sv="http://www.jcp.org/jcr/sv/1.0"; node="attribute" />
        </field>
        <field name="value" type="java.lang.String">
            <bind-xml QName-prefix="sv" name="value" />
        </field>
        </class>
</mapping>

putting the desired prefix into the name. Then I need to
reference the correct namespace.

Regards
Stefan

Werner Guttmann schrieb:
> Hi Stefan,
> 
> mind letting all other users know how you solved your problem ? And even
> if the solution if just available in the mailing list archives (for
> future search queries).
> 
> Regards
> Werner
> 
> Stefan Kuhr wrote:
>> SORRY, never mind my question. I just sovled it after
>> 2 days looking for the correct documentation.
>>
>> Stefan Kuhr schrieb:
>>> Hi,
>>>
>>> I have a question regarding missing namespace prefixes for
>>> attributes.
>>>
>>> Here is my marshalled XML
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <sv:property xmlns:sv="http://www.jcp.org/jcr/sv/1.0";
>>>     name="jcr:primaryType" type="Name">
>>>     <sv:value>mgnl:contentNode</sv:value>
>>> </sv:property>
>>>
>>>
>>> and my mapping file
>>>
>>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>>> <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
>>> "http://castor.org/mapping.dtd";>
>>> <mapping>
>>>     <class name="magnolia.JcrProperty">
>>>         <map-to xml="property" ns-prefix="sv"
>>> ns-uri="http://www.jcp.org/jcr/sv/1.0"; />
>>>         <field name="name" type="java.lang.String">
>>>             <bind-xml QName-prefix="sv" name="name" node="attribute" />
>>>         </field>
>>>         <field name="type" type="java.lang.String">
>>>             <bind-xml QName-prefix="sv" name="type" node="attribute" />
>>>         </field>
>>>         <field name="value" type="java.lang.String">
>>>             <bind-xml QName-prefix="sv" name="value" />
>>>         </field>
>>>     </class>
>>> </mapping>
>>>
>>> What do I have to do. that then prefix "sv" is added to the name and
>>> type attributes?
>>>
>>> The importing side needs these prefixes.
>>>
>>> Thanks
>>> Stefan
>>>
>>>
>>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 


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

    http://xircles.codehaus.org/manage_email


Reply via email to