You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Bjoern Tackmann <bj...@web.de> on 2004/08/16 22:52:19 UTC

Probs with Embperl, LibXSLT

Hi...

there is a strange Problem with Embperl V2 and libxslt which I don't
understand. The Software is Embperl 2.0b10, libxslt 1.0.16 on Linux.

I use EmbperlObject to build the pages, with a user defined recipe,
saying that XSLT will only be used for base.epl -- using the
standard Embperl-recipe for all other files.

For a simple request (GET w/o parameters) this works. But if I POST
some data to that page, I get a "Evaluating user parameter [...] failed"
-- where [...] is the name of the parameter posted -- in my apache
error logs. Embperl sends an error page saying "Error xpath.c:6675:
Encoding error:"

Changing the recipe to directly output the xml data gives a plain
xml document that can be "compiled" with xsltproc.

I've spent some time trying to use only standard recipes and stuff
like that, getting the same result all the time.

Thanks in advance for your help and greets from Karlsruhe,
Björn Tackmann

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: Probs with Embperl, LibXSLT

Posted by Gerald Richter <ri...@ecos.de>.
> 
> Embperl tries to give to libxslt your posted params via fdat, 
> and if these contain non-ascii symbols libxslt fails. 
> If you do not need artifically set up params in your 
> stylesheet (I dont, I want to keep things separated), then 
> you can change line in Embperl/Recipe/EmbperlXSLT.pm 
> 

I have changed things, so parameters are now correctly quoted, so they are
passed as strings, which should avoid such problems.

Of course you can change the recpie (or create your own on and use it) to
avoid parameter passing at all.

If you call your xslt processing via Execute, you can also simply pass an
empty array as xsltparam

The updated version is in the CVS and will be soon released

Gerald


> from:
> 
> push @$ep, {'type' => $xsltproc, stylesheet => \@stylesheet, 
> $param -> xsltparam?():(param => \%Embperl::fdat) } ;
> 
> to:
> 
> push @$ep, {'type' => $xsltproc, stylesheet => \@stylesheet, 
> $param -> xsltparam } ;
> 
> Neeme Vool
> neeme@codewiser.com
> Codewiser OÜ
> Tel. +372 5151195
> Fax. +372 7409988
> http://www.codewiser.com 
> 
> > -----Original Message-----
> > From: Bjoern Tackmann [mailto:bjoerntm@web.de]
> > Sent: 16. august 2004. a. 23:52
> > To: embperl@perl.apache.org
> > Subject: Probs with Embperl, LibXSLT
> > 
> > Hi...
> > 
> > there is a strange Problem with Embperl V2 and libxslt 
> which I don't 
> > understand. The Software is Embperl 2.0b10, libxslt
> > 1.0.16 on Linux.
> > 
> > I use EmbperlObject to build the pages, with a user defined recipe, 
> > saying that XSLT will only be used for base.epl -- using 
> the standard 
> > Embperl-recipe for all other files.
> > 
> > For a simple request (GET w/o parameters) this works. But if I POST 
> > some data to that page, I get a "Evaluating user parameter [...] 
> > failed"
> > -- where [...] is the name of the parameter posted -- in my apache 
> > error logs. Embperl sends an error page saying "Error
> > xpath.c:6675:
> > Encoding error:"
> > 
> > Changing the recipe to directly output the xml data gives a 
> plain xml 
> > document that can be "compiled" with xsltproc.
> > 
> > I've spent some time trying to use only standard recipes and stuff 
> > like that, getting the same result all the time.
> > 
> > Thanks in advance for your help and greets from Karlsruhe, Björn 
> > Tackmann
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: Probs with Embperl, LibXSLT

Posted by Neeme Vool <ne...@codewiser.com>.
Hi!

Embperl tries to give to libxslt your posted params via fdat, and if these
contain non-ascii symbols libxslt fails. 
If you do not need artifically set up params in your stylesheet (I dont, I
want to keep things separated), then you can change line in 
Embperl/Recipe/EmbperlXSLT.pm 

from:

push @$ep, {'type' => $xsltproc, stylesheet => \@stylesheet, $param ->
xsltparam?():(param => \%Embperl::fdat) } ;

to:

push @$ep, {'type' => $xsltproc, stylesheet => \@stylesheet, $param ->
xsltparam } ;

Neeme Vool
neeme@codewiser.com
Codewiser OÜ
Tel. +372 5151195
Fax. +372 7409988 
http://www.codewiser.com 

> -----Original Message-----
> From: Bjoern Tackmann [mailto:bjoerntm@web.de] 
> Sent: 16. august 2004. a. 23:52
> To: embperl@perl.apache.org
> Subject: Probs with Embperl, LibXSLT
> 
> Hi...
> 
> there is a strange Problem with Embperl V2 and libxslt which 
> I don't understand. The Software is Embperl 2.0b10, libxslt 
> 1.0.16 on Linux.
> 
> I use EmbperlObject to build the pages, with a user defined 
> recipe, saying that XSLT will only be used for base.epl -- 
> using the standard Embperl-recipe for all other files.
> 
> For a simple request (GET w/o parameters) this works. But if 
> I POST some data to that page, I get a "Evaluating user 
> parameter [...] failed"
> -- where [...] is the name of the parameter posted -- in my 
> apache error logs. Embperl sends an error page saying "Error 
> xpath.c:6675:
> Encoding error:"
> 
> Changing the recipe to directly output the xml data gives a 
> plain xml document that can be "compiled" with xsltproc.
> 
> I've spent some time trying to use only standard recipes and 
> stuff like that, getting the same result all the time.
> 
> Thanks in advance for your help and greets from Karlsruhe, 
> Björn Tackmann
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org