XALANC-451 Top-Level Parameters - Feature Enhancement

I am nearly ready with an integrated patch to address the
feature enhancement of JIRA XALANC-451.

I am adding an XObjectFactory to the class XalanTransformer
to create XObject(s).  These XObject(s) are created outside
the scope of any active stylesheet, and are instantiated by
the doTransform() method for the active stylesheet.

The m_params is being retyped to use class XalanParamHolder
for parameter values instead of XalanDOMString.

The XalanTransformer::clearStylesheetParams() method has
also been reworked to also reset() the m_topXObjectFactory.

I should probably create a new method to getXObjectFactory().
An instance of class XObjectFactoryDefault is used for the
m_topXObjectFactory.  This is initialized by the XalanTransformer
constructors.  I do not use an XPathFactory for this enhancement.

More overloaded XalanTransformer::setStylesheetParam(...)
methods are created.

void setStylesheetParam(
  const char *             key,
  const char *             expression);

void setStylesheetParam(
  const XalanDOMString&    key,
  const XalanDOMString&    expression);

void setStylesheetParam(
  const char *             key,
  double                   number);

void setStylesheetParam(
  const XalanDOMString&    key,
  double                   number);

void setStylesheetParam(
  const char *             key,
  XalanNode *              nodeset);

void setStylesheetParam(
  const XalanDOMString&    key,
  XalanNode *              nodeset);

void setStylesheetParam(
  const char *             key,
  XObjectPtr               object);

void setStylesheetParam(
  const XalanDOMString&    key,
  XObjectPtr               object);

Much of the code work is based on the example of
XSLT/EXSLEngineImpl.cpp and XSLT/XSLTEngineImpl.hpp.

-------------
I hope the object ownership issues are appropriate
and hope that these changes do not insert new
memory leaks.

I will update JIRA XALANC-451 with the new edits of
XalanTransformer.cpp and XalanTransformer.hpp
for review.  The patches have passed the initial
steps for compile/build.

-------------
Usage Note: Creating a nodeset top-level parameter.

You can take any precompiled XML document that is
represented as an XalanNode* and use it directly a
a nodeset bound to a top-level parameter name.

I have not included an XPathFactory or processor
to extract nodeset(s) outside of the transformation
process.

Please let the xalan-dev mailing list know of missing or
problem components.

Sincerely,
Steven J. Hathaway



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org
For additional commands, e-mail: xalan-dev-h...@xml.apache.org

Reply via email to