[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] [XSLT 2.0] Checking that an element's value has the desired datatype?
Subject: Re: [xsl] [XSLT 2.0] Checking that an element's value has the desired datatype?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 16 Oct 2006 16:41:21 +0100
|
> (The output I seek is "true", as the Altitude element does have an
> integer value.)
If you want the input tree to be annotated with type information you
need to use a schema aware processor (eg the commercial saxon-sa rather
than the free one) and you need to tell teh processor to schema-validate
the input files, and of course _have_ a schema for the input.
If you just want to know that 3300 could be made an integer (rather
than already be cast to an integer in the input) you could use castable
as rather than instance of, or use .=floor(.) depending what you want
to do these run time typing checks would of course work without assuming
a schema-aware processor.
David
| Current Thread |
- Re: [xsl] Rename Some Node ans attribute, (continued)
- Abel Braaksma - Mon, 16 Oct 2006 16:31:08 +0200
- Davide Antoni - Mon, 16 Oct 2006 17:00:52 +0200
- Costello, Roger L. - Mon, 16 Oct 2006 11:34:14 -0400
- Florent Georges - Mon, 16 Oct 2006 17:35:29 +0200 (CEST)
- David Carlisle - Mon, 16 Oct 2006 16:41:21 +0100 <=
- Michael Kay - Mon, 16 Oct 2006 16:47:08 +0100
- Costello, Roger L. - Mon, 16 Oct 2006 11:53:50 -0400
- Florent Georges - Mon, 16 Oct 2006 18:50:47 +0200 (CEST)
- Costello, Roger L. - Mon, 16 Oct 2006 13:05:11 -0400
|
|