[xslt] Request for function implementation
- From: k_isdale tpg com au
- To: xslt gnome org
- Cc: k_isdale tpg com au
- Subject: [xslt] Request for function implementation
- Date: Sun, 14 Oct 2001 21:24:55 GMT
Hi all,
I would like someone to implement this function
for me. It is to be included into the breakpoint
API. Unless someone else can do it I'm not sure
when it can be done. I think it would it take less
50 lines to implement (including comments). This
is to be used to validate the given url and line
number when adding new break points.
-----------------------------
Daniel would you prefer this go into libxml/tree.c
it could be useful for other tasks? Or maybe be
the basis of an exslt function?
---------------------------
For a description of the algorithm I had in mind
see
http://mail.gnome.org/archives/xslt/2001-October/m
sg00057.html
The interface to be implemented is
xmlNodePtr xslfindNearestNode(xsltStylesheetPtr
style, const xmlChar * url, long lineNumber, int
range);
A possible meaning for range is that the "range"
must be positive and the accurracy is then
+/-range. Where preference is given to the closest
node with a line number less than "target" line
number
You can use the newly added xmlGetLineNo to find
the line number of a node. I recommend the use of
a recursive helper function but I'll leave that
choice to you. The interface for the helper
function could be
xmlNodePtr xslfindNearest(xmlNodePtr node, const
xmlChar * url, long lineNumber, int range);
A possible meaning of url is that if it is null
then the "search" url is taken from node.
Let me know, via k_isdale@tpg.com.au, if you would
like to do this. Thanks.
bye,
Keith
Isdale
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]