[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT/XPath 2.0 (was "Identifying two tags...")

Subject: Re: XSLT/XPath 2.0 (was "Identifying two tags...")
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Tue, 14 May 2002 21:56:47 -0400
getyear in xsl
At 7:48 PM +0100 5/14/02, Francis Norton wrote:

Not sure whether it's possible or not, but I certainly don't like the idea of re-inventing XML Schema data types such as dates in XSLT or XPath.

I like the idea of being able to apply functions that depended on XML Schema data types in the absence of a PSVI, but I would hate to re-invent the data types incompatibly.


That's not necessary at all. Remember, schema or no schema all an XML document really contains is strings. I'm saying the getYear("1999-09-12") function should return the same value regardless of what the schema may say about the type of the string that it's passed. If the schema says that's a date, great! If the schema says it isn't a date, the function works just the same and still returns 1999.


In reverse if I call getYear("Barney") I expect the function to fail or return some error value, regardless of what the schema says about the type of the string I pass it.

You need to remember that a lot of the functions people are asking for that handle dates, numbers, and other types are implemented *today* in EXSLT. We do not need string typing to add these to the language. They work *today* in weakly typed XSLT 1.0. Do not confuse the need for date functions with the much less important need for date types, and similarly for the other schema types.

I am explicitly asking for weak typing in XSLT 2.0.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.