[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: XPath context evaluation
Subject: Re: XPath context evaluation
From: Victor Toni <xsl-list@xxxxxxxxx>
Date: Fri, 12 May 2006 22:30:33 +0200
|
Michael Kay wrote:
BTW, where would I register my own functions?
There are many ways in Saxon to incorporate your own functions if they are
in your own namespace (you'll have to dig around the Javadoc and probably
the code to find them though!) - essentially Saxon's XPath parser searches
in a set of FunctionLibrary objects, each of which is given the opportunity
to grab a function reference and bind it to some implementation; you can add
your own FunctionLibrary at various levels of the system either globally in
the Configuration or in a particular static context.
To add a function that's in the standard namespace is not really approved of
but I can see why you want to do it (there's a need for this in XForms as
well). At present, though, it requires code change, or at a minumum a change
to the table of functions in the StandardFunctions module.
If you want more help on this, switch to the Saxon list.
Your help is very much appreciated. Thanks a lot.
In the meantime I found a nearly trivial solution which lets my keep my
environment:
"subsequence(//info,index-of(//info/id, .), 1)"
These functions were easy to implement and solved the issue I had. Since
performance doesn't count for this use case I am glad it works :-)
Victor
|
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
RSS 2.0 |
|
Atom 0.3 |
|
|