RE: [xsl] Getting the data type of an element

Subject: RE: [xsl] Getting the data type of an element
From: David.Pawson@xxxxxxxxxxx
Date: Tue, 13 Jan 2004 15:42:18 -0000
    > What's the difference between . and data(.) please?
    
    . is the current item (most likely an element node in this case)
    data(.) is the typed value of that node.
    so if you are on an element node
    . instance of xs:boolean
    will be false as . is an element not a value, and in 
    particular not a boolean.
    but
    data(.) instance of xs:boolean
    will be true if the content of the element is schema typed 
    to be boolean.

What could you do with data(.) by itself then?
'A typed value' ????

Say the text() value of the context node came from an instance
whose schema said it was int.


Does it only make sense when used in conjunction with 'instance of' ?
  IIRC they've got rid of a group of functions that used to test if
X was int|real|date etc. Is this the replacement for those?

regards DaveP

- 
DISCLAIMER: 

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged. If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system. 

RNIB endeavours to ensure that emails and any attachments generated by 
its staff are free from viruses or other contaminants. However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments. 

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent 
those of RNIB. 

RNIB Registered Charity Number: 226227 

Website: http://www.rnib.org.uk 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread