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
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