cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laksu <lev...@leventaksu.com>
Subject Re: style sheet
Date Fri, 02 Dec 2011 15:00:24 GMT
Ok,
It took me some while to figure out on a few things. I am still quick when
you consider I am nil about XSDs.

Here are my findinds:
- Excel uses xsd information if it is supplied.
- Excel uses the same mechanism when it is asked to open an XML file. So in
that case it does not have to go through the Web server. That simplifies
with testing.
- xs:string in xsd works well with a number-only field without further
intervention. It is imported into Excel with  single quote prefix.
- xs:dateTime does not work right out of the box. Because Excel rejects a
number of certain formats. The following link tells about those formats:
http://office.microsoft.com/en-us/excel-help/xml-schema-definition-xsd-data-type-support-HP001046225.aspx
http://office.microsoft.com/en-us/excel-help/xml-schema-definition-xsd-data-type-support-HP001046225.aspx

It tells about the "unsupported" formats. Maybe it is me who is that naive
to look for it but I could not find something telling about "supported"
ones. In that case, I tried removing the time zone info from the end and
then Excel recognized that very well as a date cell.

Excel recognizes: streamingDate="2011-09-07T00:00:00"
but takes the following as string:
salesStartDate="2011-10-02T00:00:00+01:00"
I imagine Excel does not associate time zone info in its date cells so it
refuses those formats. 

So, by manually hard-coding the xsd schema and tweaking the dateTime output
with a custom "Adapter" Excel imports the result XML flawlessly.

I will be trying the next steps.
Thanks.

--
View this message in context: http://cxf.547215.n5.nabble.com/automatic-schema-generation-for-a-RS-method-tp5033048p5042117.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message