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

Re: keys and idrefs - XSLT2 request?

Subject: Re: keys and idrefs - XSLT2 request?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 12 Oct 2001 11:21:58 +0100
Re:  keys and idrefs - XSLT2 request?
Jeni

>  that was required by the stylesheet,
> something like:
> 
> <xsl:validate match="foo/bar/@date" type="xs:date" />
> <xsl:validate match="my:baz" type="my:bazType" />

Yes, exactly that's what I had in mind when I said that the stylesheet
ought have a way of declaring schema types independently of schema.
in otherwords XSLT can make a lot of use of schema part 2, but basically
nothing of schema part 1.

An alternative to stylesheet-wide declaration as above one could have 
an xoath level casting functions so

<xsl:sort select="@date"/>

would sort dates if the first declaration above matched, otherwise @date
would sort as a string, but you could force date semantics locally with
something like

<xsl:sort select="xf:string-to-date(@date)"/>

where string-to-date just casts the data to the date type.

David
(Mike's going to tell us off for using the wrong list)

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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.