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

RE: Ten new XQuery, XSLT 2.0 and XPath 2.0 Working Drafts


xquery date comparison
> "Michael Kay" <michael.h.kay@n...> wrote:
> > (Under these rules, a Basic XSLT Processor must be able to 
> manipulate 
> > atomic values conforming to any of the XML Schema built-in 
> types, for 
> > example strings, integers, decimals, doubles, dates, times, QNames. 
> > But a Basic XSLT processor does not support type 
> annotations on nodes 
> > in the data model: all nodes are untyped. And it does not support 
> > user-defined types.)
> 
> Could you clarify this?  Does this mean that a basic XSLT 
> processor MUST understand all the schema types, but MAY NOT 
> report these types?
> 

It means that you can manipulate strings, integers, dates, times, etc -
all 44 built-in types - but you cannot attach type annotations to nodes.


So with a Basic XSLT Processor I can do:

<xsl:if test="xs:date(@date-of-marriage) gt xs:date(@date-of-death)">

which takes the string values of two attributes, converts each one to a
date, and then compares them as dates. But I cannot do a date comparison
as:

<xsl:if test="@date-of-marriage gt @date-of-death">

which relies on the schema processor annotating these attributes as
being of type date.

I hope this makes it clearer.

Michael Kay


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.