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

RE: normalize as part of a 'select-distinct' in a for-each?

Subject: RE: normalize as part of a 'select-distinct' in a for-each?
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Mon, 4 Oct 1999 13:49:14 -0600
xpath select distinct
Clark Evans wrote:
> #1 Would it make sense to ammend the definition of
> "normalize" -- overloading it for node-set so that it applies
> iteratively over its members?

Functions take data of a certain type as an argument and return data of a
certain type as a result. normalize() takes a string argument and returns a
string result. If the argument is not of the right type, an attempt at
conversion to that type is made before the function is executed, according
to the rules defined in the XPath spec. There are times when this conversion
is favorable.

Applying normalize() blindly to all members of a node-set regardless of type
would be problematic due to the conversions, so what you want to propose is
a new function --say, normalize-set()-- that takes a node-set argument and
returns an identical node-set, except that normalize() has been applied only
to all the text nodes in the set.


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

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-2013 All Rights Reserved.