Re: [xslt] Issues using parameters with namespaces



On 28/02/2022 20:54, George Joseph via xslt wrote:
  I think it works because xsltProcessUserParamInternal only sets
xpctxt->namespaces = NULL but it doesn't clear xpctxt->nsHash which is where
xmlXPathRegisterNs puts the namespaces to be registered.

Right, the XPath engine uses both ->namespaces and ->nsHash.

Can you give me a hint?   I've had absolutely no luck is trying to pass a path
as a string and getting it to result in something other than "The 'select' expression
did not evaluate to a node set" even in an absurdly simple example.  I'm passing
the path double quoted "'/dm:device'" and have tried various combinations of
"select=" and "with-param".    Even Google is failing me so any help would be appreciated.

I meant that you should only use string or integer literals in parameter values and no other XPath expressions at all. This means to rework your stylesheets, of course.

Nick



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]