Re: [xslt] Request for function implementation



On Sun, Oct 14, 2001 at 09:24:55PM +0000, k_isdale@tpg.com.au wrote:
> 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.

  Yes once I have finished the current work in progress.
Others can step in though.

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]