Title: RE: [castor-dev] Namespaces

In the meantime you might want to try playing with the setNamespaceMapping and setNSPrefixAtRoot methods on the Marshaller class. I don't no of anyway to switch off the namespace markup (although you could filter these out using a custom SAX document handler). As Arnaud says you will have to provide the mappings each time yourself, currently.

-----Original Message-----
From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
Sent: 13 September 2001 18:07
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Namespaces


Hi Nielsen,

Namespaces support is the work in progress,
Castor was designed and is a data-binding framework so saving the prefix
is not needed at a point but as more and more people seems to use
Castor as a data serializer we have included in our discussion the problem
of providing prefixes and printing or not the namespaces.

Arnaud

-> -----Original Message-----
-> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
-> Sent: Thursday, September 13, 2001 7:55 AM
-> To: [EMAIL PROTECTED]
-> Subject: [castor-dev] Namespaces
->
->
-> How do I instruct Castor to ignore namespaces, i see en entry for making
-> the parser namespace aware but not for castor.
->
-> I have a schema declared like this:
->
-> <schema targetNamespace="http://www.digitalesp.com/te/schemas" xmlns="
-> http://www.w3.org/2001/XMLSchema" xmlns:tns="
-> http://www.digitalesp.com/te/schemas">
->
-> and thats what I use as input to the generator.
->
-> The input XML document has a structure like this:
->
-> <te:Expense_Sheet
-> xmlns:te="http://www.digitalesp.com/te/schemas" xmlns:xsi
-> ="http://www.w3.org/2001/XMLSchema-instance">
->
-> When I send a XML document to Castor I demarshall it , process it, and
-> marshall it up with a few minor modifications, the ouput I always get is:
->
-> <Expense_Sheet versionNumber="2001-09-13T10:21:59.000" objectId
-> ="200109131422152052090000000020" xmlns
-> ="http://www.digitalesp.com/te/schemas">
->
-> Firstly, how do I specify a namespace prefix such that the output from
-> castor would be:
->
-> <te:Expense_Sheet versionNumber="2001-09-13T10:21:59.000" objectId
-> ="200109131422152052090000000020" xmlns:te
-> ="http://www.digitalesp.com/te/schemas">
->
-> And secondly, how would I instruct Castor to leave the namespace
-> declaration out all together such as:
->
-> <Expense_Sheet versionNumber="2001-09-13T10:21:59.000" objectId
-> ="200109131422152052090000000020">
->
-> Thanks
->
-> Keith Nielsen
-> digitalESP
->
-> -----------------------------------------------------------
-> If you wish to unsubscribe from this mailing, send mail to
-> [EMAIL PROTECTED] with a subject of:
->      unsubscribe castor-dev

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

Reply via email to