[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: [OT]

Subject: RE: [OT]
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 29 Feb 2008 11:41:03 -0000
RE:  [OT]
> I am curious, what is the use of function, data() in XPath 
> 2.0; from stylesheet writer's perspective ?
> 
> As defined in the spec, data() function retrieves the typed 
> value of the argument passed. The typed value (of say, a 
> node) to me is more useful within the processor and not very 
> much to the end user ...


It's very rarely necessary to call data() explicitly, because atomization is
nearly always done automatically when needed. But there are occasions for
using it, especially with schema-aware processing.

<xsl:if test="@married">

does not mean the same as

<xsl:if test="data(@married)">

because the effective boolean value of a node is always true, regardless of
its typed value.

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.