cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject RE: ready for 1.7.3
Date Fri, 05 May 2000 16:18:56 GMT

> Furthermore, XSLT
> parameter values, at least in Xalan, are interpreted according to the
> rules for XPath expressions, so values that contained '$', for instance,
> were causing cocoon to fail since Xalan couldn't resolve the "variable".

Hmm... let me clarify.  They are passed from the command line as
expressions.  From the API, you can either do:

public void setStylesheetParam(String key, XObject value);

...passing it in a XObject of some type, so:

processor.setStylesheetParam("foo", processor.createXString("a string"));

or you can use:

public void setStylesheetParam(String key, String expression);

...in which case the second argument is an expression and not a string.

I'm not sure what you're trying to do, but if you're passing strings the
first call would probably be better than trying to quote.

This has nothing to do with how parameter values are interpreted within the
Stylesheet -- the expression is evaluated before it is bound to the
parameter.  Xalan is fully conformant to the spec for parameters.  This is
an API issue.

> Scott
> said they might revisit the issue for Xalan-1.1

Let me be more clear on this also.  The API for parameters in Xalan
sucks... it's tripped a bunch of people up.  This must be made better in
Xalan 1.1.x.

-scott




                                                                                         
                         
                    Donald Ball                                                          
                         
                    <balld@websli        To:     cocoon-dev@xml.apache.org, kevin@vcpl.net
                        
                    ngerZ.com>           cc:     (bcc: Scott Boag/CAM/Lotus)          
                            
                                         Subject:     RE: ready for 1.7.3                
                         
                    05/05/2000                                                           
                         
                    01:11 AM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    cocoon-dev                                                           
                         
                                                                                         
                         
                                                                                         
                         



On Fri, 5 May 2000, Kevin O'Neill wrote:

> Would you like to share the "talk" :) "XSLT parameter stuff" has got me a
> little stuffed also.

I reckon I can get it right. XSLT parameter names must be valid XML
QNames, so I wrote in a routine to not import into XSLT those HTTP request
parameters whose names aren't valid XML QNames. Furthermore, XSLT
parameter values, at least in Xalan, are interpreted according to the
rules for XPath expressions, so values that contained '$', for instance,
were causing cocoon to fail since Xalan couldn't resolve the "variable".

We went back and forth for a little while over whether or not this was the
correct thing for Xalan to be doing. The consensus was a firm maybe. Scott
said they might revisit the issue for Xalan-1.1, but that for the time
being the safest thing to do was wrap incoming values in quotes to force
them to be considered strings. I have the nagging feeling that the quoting
algorithm that was suggested isn't going to work in all cases, but I can't
work on it anymore right now and I don't want to hold up 1.7.3 any longer.

- donald






Mime
View raw message