> I'm using Xalan C++ 1.4, but I'm actually using it with XML::Xalan 0.44
> (with a few modifications to make it compatible with the C++ version;
> it's technically compatible with 1.3). I'll move to Xalan C++ 1.5 (or
> 1.6, if available) when Xerces Perl has moved out of beta for 2.3.0 and
> I've modified XML::Xalan again as necessary.

OK, the assert is fixed now, so you'll get a proper error about an invalid
expression.

> What I'm basically trying to do is collect a search term from a web form
> and then send both an escaped version (for URI encoding) and an
> unescaped version (for display purposes) to Xalan. I figured the
> escaping would be easier done in Perl.

This might best be done with an extension function.  In the Xalan 1.7
release, we should have an extension function that does this built into the
processor.

> It looks like I'm running up against the syntax limitations of the
> XML::Xalan::Transformer library, which seems to require that non-numeric
> parameters to stylesheets be passed between single quotation marks via
> the set_stylesheet_param method.

There's no syntax limitation here that's unique to Xalan or any other XSLT
processor.  A param in Xalan-C++ is an XPath expression, so, if you want a
string literal, you have to provide one.  The limitation that a string
literal delimited by a ' cannot contain a ' as a character, and the
analogous case with " is a limitation of XPath 1.0.  XPath 2.0 has a
mechanism to handle these cases.

> If I'm forced to escape the ' character in Perl prior to sending a
> parameter to Xalan to avoid the assertion, am I pretty much forced to do
> escaping via the stylesheet using a template (a la Bradley in The XSL
> Companion)?

I don't understand what you're saying here.  I don't have a copy of "The
XSL Companion," and I don't know what templates would have to do with it.
Again, a concrete example would help.

Dave

Reply via email to