This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]