If you feel there is a need for such functions, please feel free to develop them, and if they are useful enough I might consider shipping them with the product. Generally though, there is lots of opportunity for specialized function libraries to be developed for use with Saxon (or with XSLT and XQuery generally).
For simple functions like these it's probably best to write them in XSLT or XQuery; for more complex function you can consider writing them in Java.
There are many functions like lower-case() in the standard library that work on a single string. If you want to process a sequence of strings, use a for expression:
for $x in person/first-name return lower-case($x)
In fact the latest release allows you to do this with the "/" operator:
Michael Kay

From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of W Jirapanthong
Sent: 28 January 2005 14:55
To: Saxon-help
Subject: [saxon] customised functions

Hi all,

Has anyone been thinking about customised functins like synonym() or antonym()? or it's already been done  by anyone? just in case that we have to handle with string elements. is it possible to develop and extend the functions to Saxon packages? As below, just a rough idea:

for $item in doc("file:///c:/F.xml")//f

where  synonym($item/element_name, "photo")


another matter is i've got a error message from java application:
"A sequence of more than one item is not allowed as the first argument of lower-case()"

it seems the function allows to parse no more than one element node. what if would like to? possible?

Waraporn J.

The wait is "Ogre"! Shrek "2sday" is here! Buy the Video or DVD to see tons of amazing extras including the Shrektastic mini-film "Far Far Away Idol"!