pascalin / pycoon

Automatically exported from code.google.com/p/pycoon
GNU General Public License v2.0
0 stars 0 forks source link

Parameters passed to XSLT transformers must be enclosed in single quotes #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The GNOME libxslt library requires that /string/ arguments passed to XSLT 
stylesheets must be enclosed in single quite marks. At present, this 
requirement has been carried through into the Pycoon sitemap syntax so 
that a XSLT parameter must look like this:

<transform type="xslt" src="data2html.xslt">
  <parameter name="uri" value="'{uri}'" />
</transform>

If libxslt is passed a parameter /without/ single quote marks, it 
interprets it as a XPath expression.

Should this remain as a "feature"? Or should there perhaps be a special 
syntax for passing XPath expressions to XSLT transformers and string 
parameters be passed with no special syntax?

Original issue reported on code.google.com by pyc...@gmail.com on 31 Aug 2006 at 2:06

GoogleCodeExporter commented 9 years ago
I didn't use the libxslt, but as far as I know, other XSLT processors (4Suite 
XML,
for instance) can accept string arguments without any extra quote marks.

This link <http://www.w3.org/TR/xslt#variables> may be useful.

Can you attach a small XSLT file that allows to test a behaviour of XSLT 
processor in
this situation?

Original comment by anrien...@gmail.com on 1 Sep 2006 at 9:00

GoogleCodeExporter commented 9 years ago
OK, I've changed this so that it is no longer necessary to enclose parameter 
values 
for XSLT stylesheets in single quotes. It means that we can't pass XPath 
expressions to stylesheets, but, to be honest, I was hard pushed to think of a 
use 
case for it anyway!

Original comment by pyc...@gmail.com on 11 Sep 2006 at 8:39

GoogleCodeExporter commented 9 years ago
This bug doesn't exist in pycoon.components.cocoon.TraxTransformer r120.

Original comment by anrien...@gmail.com on 26 Feb 2007 at 8:44