Re: Initial review of xslt with no limits patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Initial review of xslt with no limits patch
Date
Msg-id 3192.1281111300@sss.pgh.pa.us
Whole thread Raw
In response to Re: Initial review of xslt with no limits patch  (Mike Fowler <mike@mlfowler.com>)
Responses Re: Initial review of xslt with no limits patch  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Initial review of xslt with no limits patch  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Mike Fowler <mike@mlfowler.com> writes:
> SELECT 
> xslt_process( ... , ... ,
>              'n1=v1,n2=v2,n3=v3,n4=v4,n5=v5'::text)

produces

> <samples>
>    <sample>v1</sample>
>    <sample>v2</sample>
>    <sample>v3</sample>
>    <sample>v4</sample>
>    <sample>v5</sample>
> </samples>

> Sadly I get the following in both versions:

> <samples>
>    <sample/>
>    <sample/>
>    <sample/>
>    <sample/>
>    <sample/>
> </samples>

Some examination of
http://www.xmlsoft.org/XSLT/tutorial/libxslttutorial.html
suggests that the parameter values need to be single-quoted,
and indeed when I change the last part of your example to
'n1=''v1'',n2=''v2'',n3=''v3'',n4=''v4'',n5=''v5'''::text);

I get
    xslt_process      
-----------------------<samples>            +  <sample>v1</sample>+  <sample>v2</sample>+  <sample>v3</sample>+
<sample>v4</sample>+ <sample>v5</sample>+</samples>           +
 
(1 row)

So this seems to be a documentation problem more than a code problem.

(It's a bit distressing to notice that the regression tests for the
module fail to exercise 3-parameter xslt_process at all, though.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: refactoring comment.c
Next
From: Simon Riggs
Date:
Subject: Re: refactoring comment.c