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: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 16 Oct 2006 20:38:59 +0100
> >> I can do datatype checking, without using XML Schemas.
> 
> > No, you do string matching on the lexical representation of the 
> > values.  The difference can be important.
> 
> What is the difference?  
> 

Well, some telephone numbers consist entirely of digits, but a telephone
number is not an integer - for example, leading zeros are significant. If
you want to do proper type checking, then an operation that works on
integers shouldn't accept a telephone number, just because it happens to be
all-numeric.

Michael Kay
http://www.saxonica.com/

Current Thread