|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] format-date and xsd:date
I'm not really sure where this question/comment ought to go, but since
it came in the midst of working with XSTL 2, this seems a good place.
The data-typing-related support in XSLT 2 is based on XML Schema. So, in both cases, a "date" is defined as YYYY-MM-DD, and anything else is invalid. While this makes sense when you consider YYYY/MM/DD, MM-DD-YYYY and so forth, why can't all of the following be valid dates? YYYY-MM-DD YYYY-MM YYYY This comes out of working with bibliographic data, where one typically has issue dates of year-only, sometimes year-and-month, and only occasionally the full "date" as understood by xs:date. This means I have to define my own schema patterns if I write a schema, and my own equivalents to handle the stuff in XSLT 2 if I don't want to select the substrings. Does nobody else find this a problem? Is there any prospect to change it? I'm just having a hard time understanding how I can code a schema to enforce dates of the sort I deal with and also get the advantage of the datatyping and XSLT 2 date formatting. If I do: <date year="1999" month="03"/> ... that's easy to control and flexible, but there's no format-month function (in Saxon 8 at least). Bruce
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








