Thanks for your high speed answer.
I already created from serval XSD-Files with castor classes.
Stumbling through a few pitfalls.
RegEx does not support "\c" for unicode characters.
If I have nested definitions with restrictions for the attributes (with
code generation) some times
attributes apear twice by doing marshalling. If it is necessary I can
provide examples code.
A nother thing is when I use a SAX 2.0 implementation how can I configure
code generation to
give me for signature : public void marshal(org.xml.sax.DocumentHandler
handler) the actual one.
with: public void marshal(org.xml.sax.ContentHandler handler)?
I use the CVS packed version from last week
ok. let us follow the second track of your suggestion.
Can you give me a short code example (based on source code generation made
by castor)?
Thanks for your time and with regards
Dirk
> -----Original Message-----
>Hi Dirk,
>
>There is two problems here: you seem to want to round-trip namespace
>declaration and specify information about you xml like specifying the
>schema location when marshalling.
>
>1. Using namespaces
>
> - If you want to let Castor to do the entire job you should use the
>object model and the class descriptors generated by the Source
>Generator. The descriptors save all the namespace information.
>
> - If you don't want to use the Source Generator then you must a mapping
>file. A new feature is available in the cvs to specify how to save
>namespace. Here is a example:
>
>First add a java Map in your object model to store the namespace prefix:
>
>public MyClass {
>
> Hashtable _namespaces;
>
> ....
> public Hashtable getNamespaces() {
> return _namespaces;
> }
>
> public void setNamespaces(Hashtable namespaces) {
> _namespaces = namespaces;
> }
>....
>
>}
>
>Then update your mapping file to indicate that you want to save
>namespaces:
><field name="namespaces" collection="hashtable" type="string">
> <bind-xml node="namespace"/>
></field>
>
>2 To specify the schema location you can use the method
>Marshaller#setSchemaLocation. If each XML documents you are processing
>used a different schemaLocation you'll have to save this information in
>the object Model and tell Castor to ignore it while marshalling and set
>it manually when creating a new Marshaller.
>
>
>Hope that helps,
>
>Arnaud
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev