Logo Search packages:      
Sourcecode: xalan version File versions  Download package

XSLTEngineImpl Class Reference

#include <XSLTEngineImpl.hpp>

Inheritance diagram for XSLTEngineImpl:

XSLTProcessor PrefixResolver

List of all members.


Detailed Description

It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison, the DOM, and the XPath engine, to transform a source tree of nodes into a result tree according to instructions and templates specified by a stylesheet tree. The process method is the primary public entry points.

If you reuse the processor instance, you should call reset() between calls.

Definition at line 122 of file XSLTEngineImpl.hpp.


Public Types

typedef XalanVector< bool > BoolVectorType
typedef
XPathConstructionContext::GetAndReleaseCachedString 
CCGetAndReleaseCachedString
typedef
XPathExecutionContext::GetAndReleaseCachedString 
ECGetAndReleaseCachedString
typedef XalanVector< const
LocatorType * > 
LocatorStack
typedef
StylesheetExecutionContext::ParamVectorType 
ParamVectorType
typedef size_t size_type
typedef XalanVector
< TraceListener * > 
TraceListenerVectorType
typedef XalanVector< const
XalanDOMString * > 
XalanDOMStringPointerVectorType
typedef
Function::XObjectArgVectorType 
XObjectArgVectorType
typedef XalanMemMgrAutoPtr
< XPathProcessor, true > 
XPathProcessorPtrType

Public Member Functions

void addResultAttribute (const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const LocatorType *locator=0)
void addResultAttribute (const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const LocatorType *locator=0)
void addResultAttribute (AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, XalanDOMString::size_type theLength, bool fromCopy=false, const LocatorType *locator=0)
void addResultAttribute (AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const LocatorType *locator=0)
void addResultAttribute (AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const LocatorType *locator=0)
void addResultNamespaceDecl (const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, XalanDOMString::size_type len)
void addResultNamespaceDecl (const XalanDOMString &prefix, const XalanDOMString &namespaceVal)
virtual void addTraceListener (TraceListener *tl)
void cdata (const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length)
void characters (const XObjectPtr &xobject)
void characters (const XalanNode &node)
void characters (const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length)
void characters (const XalanDOMChar *ch, XalanDOMString::size_type length)
void charactersRaw (const XObjectPtr &xobject)
void charactersRaw (const XalanNode &node)
void charactersRaw (const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length)
void clearTopLevelParams ()
void cloneToResultTree (const XalanNode &node, XalanNode::NodeType nodeType, bool overrideStrip, bool shouldCloneAttributes, bool cloneTextNodesOnly, const LocatorType *locator)
void cloneToResultTree (const XalanNode &node, bool cloneTextNodesOnly, const LocatorType *locator)
void comment (const XalanDOMChar *data)
void copyAttributeToTarget (const XalanDOMString &attrName, const XalanDOMString &attrValue, AttributeListImpl &attrList)
void copyNamespaceAttributes (const XalanNode &src)
const XPath * createMatchPattern (const XalanDOMString &str, const PrefixResolver &resolver)
void endDocument ()
void endElement (const XalanDOMChar *name)
void entityReference (const XalanDOMChar *data)
virtual void error (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const
virtual void error (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
double evalMatchPatternStr (const XalanDOMString &str, XalanNode *context, XPathExecutionContext &executionContext)
const XObjectPtr evalXPathStr (const XalanDOMString &str, XalanNode *contextNode, const XalanElement &prefixResolver, XPathExecutionContext &executionContext)
const XObjectPtr evalXPathStr (const XalanDOMString &str, XalanNode *contextNode, const PrefixResolver &prefixResolver, XPathExecutionContext &executionContext)
const XObjectPtr evalXPathStr (const XalanDOMString &str, XPathExecutionContext &executionContext)
virtual void fireGenerateEvent (const GenerateEvent &ge)
virtual void fireSelectEvent (const SelectionEvent &se)
virtual void fireTraceEvent (const TracerEvent &te)
void flushPending ()
virtual FormatterListenergetFormatterListener () const
bool getHasPendingStartDocument () const
const LocatorType * getLocatorFromStack () const
MemoryManagerType & getMemoryManager ()
bool getMustFlushPendingStartDocument () const
virtual const XalanDOMString * getNamespaceForPrefix (const XalanDOMString &prefix) const
const AttributeListType & getPendingAttributes () const
const XalanDOMString & getPendingElementName () const
ProblemListenergetProblemListener () const
bool getQuietConflictWarnings () const
const XalanDOMString * getResultNamespaceForPrefix (const XalanDOMString &prefix) const
const XalanDOMString * getResultPrefixForNamespace (const XalanDOMString &theNamespace) const
virtual XalanNode * getSourceTreeFromInput (const XSLTInputSource &inputSource)
StylesheetgetStylesheetFromPIURL (const XalanDOMString &xslURLString, XalanNode &fragBase, const XalanDOMString &xmlBaseIdent, bool isRoot, StylesheetConstructionContext &constructionContext)
virtual const StylesheetRootgetStylesheetRoot () const
virtual size_type getTraceListeners () const
virtual bool getTraceSelects () const
virtual void getUniqueNamespaceValue (XalanDOMString &theValue)
virtual const XalanDOMString & getURI () const
virtual XMLParserLiaison & getXMLParserLiaison () const
XPathEnvSupport & getXPathEnvSupport ()
XPathFactory & getXPathFactory ()
XPathProcessor & getXPathProcessor ()
void ignorableWhitespace (const XalanDOMChar *ch, XalanDOMString::size_type length)
bool isElementPending () const
bool isPendingResultPrefix (const XalanDOMString &thePrefix) const
virtual void message (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const
virtual void message (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
void outputResultTreeFragment (const XalanDocumentFragment &theTree, bool outputTextNodesOnly, const LocatorType *locator)
void outputResultTreeFragment (const XObject &theTree, bool outputTextNodesOnly, const LocatorType *locator)
void outputToResultTree (const XObject &value, bool outputTextNodesOnly, const LocatorType *locator)
XalanDocument * parseXML (const InputSourceType &inputSource, DocumentHandlerType *docHandler, XalanDocument *docToRegister)
XalanDocument * parseXML (const XalanDOMString &urlString, DocumentHandlerType *docHandler, XalanDocument *docToRegister)
void popLocatorStack ()
void popOutputContext ()
virtual void process (const XSLTInputSource &inputSource, XSLTResultTarget &outputTarget, StylesheetExecutionContext &executionContext)
virtual void process (const XSLTInputSource &inputSource, const XSLTInputSource &stylesheetSource, XSLTResultTarget &outputTarget, StylesheetConstructionContext &constructionContext, StylesheetExecutionContext &executionContext)
void processingInstruction (const XalanDOMChar *target, const XalanDOMChar *data)
virtual StylesheetRootprocessStylesheet (const XalanDOMString &xsldocURLString, StylesheetConstructionContext &constructionContext)
virtual StylesheetRootprocessStylesheet (const XSLTInputSource &stylesheetSource, StylesheetConstructionContext &constructionContext)
void pushLocatorOnStack (const LocatorType *locator)
void pushOutputContext (FormatterListener *theListener)
virtual void removeTraceListener (TraceListener *tl)
void replacePendingAttribute (const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
void reportDuplicateNamespaceNodeError (const XalanDOMString &theName, const LocatorType *locator)
virtual void reset ()
void resetDocument ()
virtual void resolveTopLevelParams (StylesheetExecutionContext &executionContext)
void returnXPath (const XPath *xpath)
virtual void setDiagnosticsOutput (PrintWriter *pw)
void setDocumentLocator (const LocatorType *locator)
virtual void setExecutionContext (StylesheetExecutionContext *theExecutionContext)
virtual void setFormatterListener (FormatterListener *flistener)
void setHasPendingStartDocument (bool b)
void setMustFlushPendingStartDocument (bool b)
void setPendingAttributes (const AttributeListType &pendingAttributes)
void setPendingElementName (const XalanDOMChar *elementName)
void setPendingElementName (const XalanDOMString &elementName)
void setProblemListener (ProblemListener *l)
virtual void setQuietConflictWarnings (bool b)
virtual void setStylesheetParam (const XalanDOMString &key, XObjectPtr value)
virtual void setStylesheetParam (const XalanDOMString &key, const XalanDOMString &expression)
virtual void setStylesheetRoot (const StylesheetRoot *theStylesheet)
virtual void setTraceSelects (bool b)
void startDocument ()
void startElement (const XalanDOMChar *name)
void startElement (const XalanDOMChar *name, AttributeListType &atts)
void traceSelect (StylesheetExecutionContext &executionContext, const ElemTemplateElement &theTemplate, const NodeRefListBase &nl, const XPath *xpath) const
virtual void warn (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const
virtual void warn (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
 XSLTEngineImpl (MemoryManagerType &theManager, XMLParserLiaison &parserLiaison, XPathEnvSupport &xpathEnvSupport, DOMSupport &domSupport, XObjectFactory &xobjectFactory, XPathFactory &xpathFactory)

Static Public Member Functions

static const XalanDOMString & getXalanXSLNameSpaceURL ()
static const XalanDOMString & getXSLNameSpaceURL ()
static void initialize (MemoryManagerType &theManager)
static void terminate ()

Protected Member Functions

void copyAttributesToAttList (const XalanNode &node, AttributeListImpl &attList)
FormatterListenergetFormatterListenerImpl () const
bool getHasPendingStartDocumentImpl () const
bool getMustFlushPendingStartDocumentImpl () const
AttributeListImpl & getPendingAttributesImpl ()
const AttributeListImpl & getPendingAttributesImpl () const
XalanDOMString & getPendingElementNameImpl ()
const XalanDOMString & getPendingElementNameImpl () const
void setFormatterListenerImpl (FormatterListener *flistener)
void setHasPendingStartDocumentImpl (bool b)
void setMustFlushPendingStartDocumentImpl (bool b)
void setPendingAttributesImpl (const AttributeListType &pendingAttributes)
void setPendingElementNameImpl (const XalanDOMChar *elementName)
void setPendingElementNameImpl (const XalanDOMString &elementName)

Protected Attributes

BoolVectorType m_cdataStack
XalanDOMString m_resultNameSpacePrefix
XalanDOMString m_resultNameSpaceURL
XObjectFactorym_xobjectFactory
XPathFactory & m_xpathFactory
const XPathProcessorPtrType m_xpathProcessor

Private Member Functions

void addResultNamespace (const XalanNode &theNode, AttributeListImpl &thePendingAttributes, bool fOnlyIfPrefixNotPresent=false)
void addResultNamespace (const XalanDOMString &thePrefix, const XalanDOMString &theName, const XalanNode &theNode, AttributeListImpl &thePendingAttributes, bool fOnlyIfPrefixNotPresent)
void checkDefaultNamespace (const XalanDOMString &theElementName, const XalanDOMString &theElementNamespaceURI)
void cloneToResultTree (const XalanText &node, bool overrideStrip)
void doFlushPending ()
void fireCharacterGenerateEvent (const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length, bool isCDATA)
void fireCharacterGenerateEvent (const XalanDOMString &theString, bool isCDATA)
void fireCharacterGenerateEvent (const XObjectPtr &theXObject, bool isCDATA)
void fireCharacterGenerateEvent (const XalanNode &theNode, bool isCDATA)
bool generateCDATASection () const
bool isCDataResultElem (const XalanDOMString &elementName) const
XSLTEngineImploperator= (const XSLTEngineImpl &)
bool operator== (const XSLTEngineImpl &) const
bool pendingAttributesHasDefaultNS () const
void problem (const XalanDOMString &msg, ProblemListener::eClassification classification, const LocatorType &locator, const XalanNode *sourceNode) const
void problem (const XalanDOMString &msg, ProblemListener::eClassification classification, const XalanNode *sourceNode, const ElemTemplateElement *styleNode) const
void warnCopyTextNodesOnly (const XalanNode *sourceNode, const LocatorType *locator)
 XSLTEngineImpl (const XSLTEngineImpl &)

Static Private Member Functions

static void installFunctions (MemoryManagerType &theManager)
static void uninstallFunctions ()

Private Attributes

XalanDOMStringPointerVectorType m_attributeNamesVisited
ProblemListenerDefault m_defaultProblemListener
PrintWriter * m_diagnosticsPrintWriter
DOMSupport & m_domSupport
AttributeListImpl m_dummyAttributesList
StylesheetExecutionContext * m_executionContext
bool m_hasCDATASectionElements
OutputContextStack m_outputContextStack
XMLParserLiaison & m_parserLiaison
ProblemListenerm_problemListener
bool m_quietConflictWarnings
XalanNamespacesStack m_resultNamespacesStack
XalanDOMString m_scratchString
LocatorStack m_stylesheetLocatorStack
const StylesheetRootm_stylesheetRoot
ParamVectorType m_topLevelParams
TraceListenerVectorType m_traceListeners
bool m_traceSelects
unsigned long m_uniqueNSValue
XPathConstructionContextDefault m_xpathConstructionContext
XPathEnvSupport & m_xpathEnvSupport

Static Private Attributes

static const XalanDOMString s_emptyString
static const XalanDOMString & s_hrefString = ::s_hrefString
static const XalanDOMString & s_piTokenizerString = ::s_piTokenizerString
static const XalanDOMString & s_stylesheetNodeName = ::s_stylesheetNodeName
static const XalanDOMString & s_typeString = ::s_typeString
static const XalanDOMString & s_typeValueString1 = ::s_typeValueString1
static const XalanDOMString & s_typeValueString2 = ::s_typeValueString2
static const XalanDOMString & s_typeValueString3 = ::s_typeValueString3
static const XalanDOMString & s_typeValueString4 = ::s_typeValueString4
static const XalanDOMString & s_uniqueNamespacePrefix = ::s_uniqueNamespacePrefix
static const XalanDOMString & s_XalanNamespaceURL = ::s_XalanNamespaceURL
static const XalanDOMString & s_XSLNameSpaceURL = ::s_XSLNameSpaceURL

Classes

struct  FindStringPointerFunctor
struct  LessXalanDOMStringPointers

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index