Re: [xml] Some words about libxslt

Date view Thread view Subject view Author view

From: Daniel Veillard (veillard@redhat.com)
Date: Mon Mar 05 2001 - 08:48:43 EST


On Mon, Mar 05, 2001 at 02:35:47PM +0100, Tom . wrote:
>
>
> Hi,
> Here are some notes about XPath/XSLT functions in libxslt.
>
> In xsltDocumentFunction, the problem with XPointer could have been solved
> with some kind of "Simple API for XPath/XPtr/XSLT" as I earlier suggested
> it : whether an XPtrExpr returns a location set or a node-set can be
> guessed by its syntax (if it uses the range, range-inside, start-point,
> end-point, range-to or string-range functions) ; using a "plugable" API
> similar to the SAX one allows you to handle expressions differently without
> having to write another parser. I'm writing such an API and will keep you
> informed.

  Humm, open source projects don't work that way ... You can't say
"hold on I'm writing some code you may look at later", sorry :-)

> Another solution should be to evaluate the XPointer expression
> and test the result type.

  yes and it seems quite simpler.

> In xsltKeyFunction, the "TODO: find uri when qualified name" is, I guess,
> just a call to xmlXPathNsLookup to add, isn't it?

  more or less

> The TODO "handle NODE set as 2nd args of key()" should be very easy to
> solve. It's basically the same as the id() function when passing a node-set
> argument.

  sounds so, yes.
  
> There is a problem in xsltSystemPropertyFunction : you don't use QNames.
> The Rec says "version", "vendor" and "vendor-url" Ťare all in the XSLT

  There is a TODO on this matter.

> prefix isn't necessary bound to the XSLT namespace. I also suggest using an
> hash table to set and retrieve predefined and "vendor-defined" properties.
> This hash table should be application-wide, not bound to each evaluation
> context.

  extension functions (and elements) are alreeady in an hash table.
The prefix binding has to be recomputed for each context.

> In xsltFunctionAvailableFunction, it seems you just need to call
> xmlXPathFunctionLookupNs after having expanded the prefix with
> xmlXPathNsLookup.

  yes,

> I'll try to provide some patch soon...

  okay,

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Mar 05 2001 - 10:43:37 EST