[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Required item type of first argument of <function>
> I'm creating a function (so using 2.0), and this function > should be generic enough to handle pretty much anything I > throw at it, so I set the param type as node(). Trouble pops > up though when I call a function such as the upper-case() > xslt function on the parameter being passed in, as it's a > string now, not a node. > You've simplified the code to illustrate the problem, which is fine, but sometimes when people submit a problem like this I like to stand back and think: what are you actually trying to achieve? What is the problem to which this rather convoluted code is perceived as the solution? As far as I can see, you are trying to make one function do too much. It doesn't feel right to me that a function that navigates to descendent nodes when given a node, should also do something useful if given a string. Sure, you can do it, but is there a better design? Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay
|
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
|