Hi,
I'm trying to create a marshalling/unmarshalling set-up for a bunch of rather complicated related schema definitions. I'm running into all kinds of issues so I'm back to the basics, but even here I run into problems... I created a simple schema definition and am trying to map from xml instance docs to hand coded classes.


I seem to have a problem with the validation of the mapping file.
Loading the mapping for unmarshalling, I get the following parsing exception:


org.xml.sax.SAXException: Parsing Error : Attribute value "http://casmap.njvv.org"; of type NMTOKEN must be a name token.

This has to do with the definition of the mapping, in particular the 'map-to' atttribute 'ns-uri'. This has to be a NMTOKEN.
It will not parse when in castor.properties one or both of the properties org.exolab.castor.parser.validation / org.exolab.castor.parser.namespaces is set to true.


Mapping file I use:
<class name="org.njvv.casmap.vehicles.Car" extends="org.njvv.casmap.vehicles.Vehicle" >
<map-to xml="car" ns-uri="http://casmap.njvv.org"; ns-prefix="vehicles" /> <field name="carName" type="string">
<bind-xml name="name" node="element"/>
</field>
<field name="topSpeed" type="int">
<bind-xml name="top-speed" node="attribute"/>
</field>
<field name="wheels" type="org.njvv.casmap.vehicles.Wheel" collection="vector">
<bind-xml name="wheels" node="element"/>
</field>
</class>


What's going on here? I cannot use any : or / in the uri? What am I overlooking?
Any help really welcome.


--
Alcatel UGR, Branche R&I, CIT
voice: +33 1 69 63 4059
fax: +33 1 69 63 4450
mailto: [EMAIL PROTECTED]
----------------------------------------------------
When was the last time you did something for the first time?

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to