Re: [xslt] exsl:tokenize() problem



On Fri, Mar 11, 2005 at 03:49:58PM +0100, Nicolas Mailhot wrote:
> I think the problem here is the changing of document context (but why is
> it affecting keys ? Aren't keys supposed to be more or less stable when
> transformation begins ?)

  no. exslt:tokenize creates a new document. keys() may not be computed
on that document. Unclear if they should be.

> --- without-tokenize.log        2005-03-11 15:30:53.000000000 +0100
> +++ with-tokenize.log   2005-03-11 15:31:51.000000000 +0100
> @@ -91,10 +91,16 @@
>  Evaluating variable expanded
>  reusing transformation dict for RVT
>  xsltApplyOneTemplate: copy node classpath
> +xsltForEach: select exsl-str:tokenize('foo', ':; ')
> +Lookup function {http://exslt.org/strings}tokenize
> +found function tokenize
> +reusing transformation dict for RVT
> +xsltForEach: select evaluates to 1 nodes
> +xsltForEach: Changing document - context doc index.xml, xpathdoc (null)
>  call-template: name findelem
>  Handling param pathname
> -        select 'foo'
> -Building variable pathname select 'foo'
> +        select string(.)
> +Building variable pathname select string(.)
>  Evaluating variable pathname
>  Object is a string : foo
>  applying template 'findelem'

  I don't see any problem here, 

> >   it could be a bug, but I didn't dot any exslt:tokenize bug report
> > recently, so it seems to work as expected.
> 
> Well it certainly does not work as expected here;( But since I never
> really played with tokenize before, maybe it's my expectations which are
> wrong.

  if your reference a node in the exslt:tokenize result it is in a different
document tree than the current one.

> Attaching the problem xslt with 4 small xmls to apply on. The command I
> use on it is :

  I honnestly don't have much time right now. Do not hold your breath.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
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]