[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Creating XPath2 functions:passing a set of nodes,
I would recommend that you define the argument as a sequence of doubles as="xs:double*" rather than as a sequence of nodes. If you call it supplying a sequence of nodes, they will then automatically be atomized to yield the contained doubles. If you declared it to require a sequence of nodes as="node()*" then you would be unnecessarily constrained in how you call the function. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx] > Sent: 25 January 2006 21:26 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Creating XPath2 functions:passing a set of > nodes, what is the signature construction? > > I am learning XPath2 using Saxon 8.6. I'd like to create a > funtion to compute the standard deviation of the value of a > set of nodes. Is there some special way to construct the > signature of the function when the argument is a set of nodes > as opposed to a single node? > > I have written a funtion that takes a single node as an > argument of type xs:double. Is there some special way to > state that the function will take a set of nodes of type > xs:double, or do I simply state that the argument will be of > type xs:double? > > -- > Charles Knell > cknell@xxxxxxxxxx - email
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|