I believe the solution is a bit more complex than that, since the params
are set on a local object, not on a member object. Perhaps a better
solution is to have a protected virtual function which would allow you to
intercept the call to set the params? For example, the default would be
this:
virtual void
setStylesheetParams(XSLTEngineImpl& theEngine) const
{
// Set the parameters if any.
for (ParamPairVectorType::size_type i = 0; i < m_paramPairs.size();
++i)
{
theEngine.setStylesheetParam(m_paramPairs[i].first,
m_paramPairs[i].second);
}
}
When preparing to do the transformation, the core code would call this
function. You could override this, chain up, then add whatever params you
need to.
Dave
Wolfgang Schell
<wolfgang.schell To:
[email protected]
@gmx.de> cc: (bcc: David N
Bertoni/Cambridge/IBM)
Subject: How about making the
private members of XalanTransformer protected?
03/14/2002 02:55
AM
Hi!
I'm using Xalan in a project, where I need to set a stylesheet parameter as
nodeset but XalanTransformer allows only string parameters. At first, I
wanted to send a mail to this list to ask for this function to be included
in the
next release but that would probably take some time. So I decided to write
a
derived class with a new function, which allows access to the
XSLTEngineImpl::setStylesheetParam(XalanDOMString, XObjectPtr).
Unfortunately all member variables of XalanTransformer are private. Of
course I could just change the include file to suit my needs, but how about
making
the private members of XalanTransformer protected in the distribution as
well? So everybody who needs a function not supplied by XalanTransformer
can
write a dervied class and implement the wanted functionality without having
to
rebuild the whole Xalan library.
Cheers
Wolfgang
--
Wolfgang Schell
[EMAIL PROTECTED]
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net