Hi Trond,
Usually Castor doesn't add the xmlns="" unless it needs to because there
is a default namespace set on an ancestor element and the current
element doesn't belong to that default namespace.
What does your mapping file look like?
Is the <Time> element the root element, or is it a child of someother
element?
The Marshaller#setNoNamespaceSchemaLocation and the
Marshaller#setSchemaLocation methods do not control namespace output.
You could try Marshaller#setNamespaceMapping, but that won't get rid of
the xmlns="" in most cases.
--Keith
[EMAIL PROTECTED] wrote:
>
> I've been having a problem getting the correct format on the date
> during marshalling. I've looked at the Castor Wiki page and got my
> own date handler to format correctly, but when I use the mapping
> file I get namespaces included into the element.
>
> <Time xmlns="">2003-11-12T13:05:26</Time>
>
> This format is correct, but I would like to get away with the
> namespace within the node. I've tried the following methods:
>
> marshaller.setSuppressXSIType(true);
> marshaller.setNoNamespaceSchemaLocation("urn:bankid:Bank_RA_Schema");
> marshaller.setSchemaLocation("with_some_values");
>
> in different combinations, but it doesn't seem to help me.
>
> I looked at the DateFieldHandler, but I'm a bit unsure how to
> actually use the DateFieldHandler class, since it doesn't have any
> empty constructor which is required when using it directly from the
> mapping file.
>
> The format that I want is very close to what I actually get default
> from Castor, but not excatly the same. Is it possible to remove the
> milliseconds and the timezone from the default formatting. I've
> looked through the property files, but couldn't find such a setting.
>
> I'm using 0.9.5.2 on WinNT 4.0, jdk1.4.1_02, locale Norwegian.
>
> I can post more details if needed.
>
> Thanks
>
> ---- Trond
>
> -----------------------------------------------------------
> 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