This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: [XSL] Declaring datatypes for Attributes
- To: Peter Tsantes <PTsantes at Tradescape dot com>
- Subject: Re: [xsl] [XSL] Declaring datatypes for Attributes
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Thu, 10 May 2001 09:40:44 +0100
- CC: xsl-list at lists dot mulberrytech dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <4A0CE95CA3F8AE4198E213D807BF0D5B7D80F4@excnyc001.corp.tradescape.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Peter,
> Is it possible to declare a datatype for a set of attributes using:
> xmlns:dt="urn:schemas-microsoft-com:datatypes"
> xmlns="urn:schemas-microsoft-com:xml-data"
>
> I'm displaying and ordering the attributes, but they don't order
> numeric. I know that datatypes can be set on element values, but
> what about attributes. Do they inherit?
You can define the data type of elements and attributes within a
schema but not, as far as I know, by using XDR within an instance XML
document.
But to answer the XSLT question, you can declare that a sort should be
based on a numeric value rather than alphabetic, you can use the
data-type attribute on xsl:sort:
<xsl:sort select="@orderqty" data-type="number" />
<xsl:sort select="@price" data-type="number" />
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list