Xalan-C++ API Documentation
Go to the documentation of this file.
18 #if !defined(XALAN_XSLTENGINEIMPL_HEADER_GUARD)
19 #define XALAN_XSLTENGINEIMPL_HEADER_GUARD
43 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
81 XALAN_DECLARE_XERCES_CLASS(InputSource)
82 XALAN_DECLARE_XERCES_CLASS(DocumentHandler)
86 XALAN_CPP_NAMESPACE_BEGIN
139 if (theLHS == 0 && theRHS != 0)
143 else if (theRHS == 0)
149 return theLHS->
compare(*theRHS) < 0 ? true :
false;
170 assert(theString != 0);
172 return *theString == m_string;
204 MemoryManager& theManager,
217 return m_xpathConstructionContext.getMemoryManager();
223 return m_xpathConstructionContext.getMemoryManager();
231 initialize(MemoryManager& theManager);
244 eClassification classification,
246 const Locator* locator,
252 eClassification classification,
335 setTraceSelects(
bool b);
342 const XPath* xpath)
const;
386 DocumentHandler* docHandler,
388 ErrorHandler* theErrorHandler = 0);
403 const InputSource& inputSource,
404 DocumentHandler* docHandler,
406 ErrorHandler* theErrorHandler = 0);
421 getStylesheetFromPIURL(
445 addResultNamespaceDecl(
447 namespaceVal.
c_str(),
461 const XalanDOMChar* namespaceVal,
464 m_resultNamespacesStack.addDeclaration(
485 bool fromCopy =
false,
486 const Locator* locator = 0)
510 const XalanDOMChar* value,
511 bool fromCopy =
false,
512 const Locator* locator = 0)
538 const XalanDOMChar* value,
540 bool fromCopy =
false,
541 const Locator* locator = 0);
555 const XalanDOMChar* value,
556 bool fromCopy =
false,
557 const Locator* locator = 0)
559 assert(m_outputContextStack.empty() ==
false);
562 getPendingAttributesImpl(),
582 bool fromCopy =
false,
583 const Locator* locator = 0)
585 assert(m_outputContextStack.empty() ==
false);
588 getPendingAttributesImpl(),
601 reportDuplicateNamespaceNodeError(
603 const Locator* locator);
606 setDocumentLocator(
const Locator* locator);
616 const XalanDOMChar* name,
620 endElement(
const XalanDOMChar* name);
624 const XalanDOMChar* ch,
629 const XalanDOMChar* ch,
633 processingInstruction(
634 const XalanDOMChar* target,
635 const XalanDOMChar* data);
649 const XalanDOMChar* ch,
676 startElement(
const XalanDOMChar* name);
689 const XalanDOMChar* ch,
715 comment(
const XalanDOMChar* data);
724 entityReference(
const XalanDOMChar* data);
735 const XalanDOMChar* ch,
749 bool cloneTextNodesOnly,
750 const Locator* locator);
767 bool shouldCloneAttributes,
768 bool cloneTextNodesOnly,
769 const Locator* locator);
781 bool outputTextNodesOnly,
782 const Locator* locator);
795 bool outputTextNodesOnly,
796 const Locator* locator)
798 outputResultTreeFragment(
813 outputResultTreeFragment(
815 bool outputTextNodesOnly,
816 const Locator* locator);
851 return s_XSLNameSpaceURL;
862 return s_XalanNamespaceURL;
873 return m_quietConflictWarnings;
892 getResultPrefixForNamespace(
const XalanDOMString& theNamespace)
const;
938 returnXPath(
const XPath* xpath);
946 copyNamespaceAttributes(
const XalanNode& src);
1000 copyAttributeToTarget(
1013 return m_xpathFactory;
1024 return *m_xpathProcessor.get();
1042 return m_xpathEnvSupport;
1056 m_problemListener = l;
1070 return m_problemListener;
1081 m_outputContextStack.pushContext(theListener);
1090 m_outputContextStack.popContext();
1100 return getHasPendingStartDocumentImpl();
1110 setHasPendingStartDocumentImpl(b);
1120 return getMustFlushPendingStartDocumentImpl();
1130 setMustFlushPendingStartDocumentImpl(b);
1141 return getPendingAttributesImpl();
1152 getPendingAttributesImpl() = pendingAttributes;
1164 const XalanDOMChar* theName,
1165 const XalanDOMChar* theNewType,
1166 const XalanDOMChar* theNewValue)
1170 getPendingAttributesImpl().addAttribute(theName, theNewType, theNewValue);
1176 return !getPendingElementNameImpl().empty();
1187 return getPendingElementNameImpl();
1198 setPendingElementNameImpl(elementName);
1204 setPendingElementNameImpl(elementName);
1215 return m_stylesheetLocatorStack.empty() ==
true ? 0 : m_stylesheetLocatorStack.back();
1226 m_stylesheetLocatorStack.push_back(locator);
1235 if (m_stylesheetLocatorStack.empty() ==
false)
1237 m_stylesheetLocatorStack.pop_back();
1251 return m_outputContextStack.getPendingAttributes();
1262 return m_outputContextStack.getPendingAttributes();
1273 getPendingAttributesImpl() = pendingAttributes;
1284 return m_outputContextStack.getPendingElementName();
1295 return m_outputContextStack.getPendingElementName();
1306 m_outputContextStack.getPendingElementName() = elementName;
1317 assert(elementName != 0);
1319 m_outputContextStack.getPendingElementName() = elementName;
1329 return m_outputContextStack.getHasPendingStartDocument();
1339 m_outputContextStack.getHasPendingStartDocument() = b;
1349 return m_outputContextStack.getMustFlushPendingStartDocument();
1359 m_outputContextStack.getMustFlushPendingStartDocument() = b;
1365 return m_outputContextStack.getFormatterListener();
1371 m_outputContextStack.getFormatterListener() = flistener;
1393 copyAttributesToAttList(
1421 warnCopyTextNodesOnly(
1423 const Locator* locator);
1434 bool overrideStrip);
1441 pendingAttributesHasDefaultNS()
const;
1449 bool fOnlyIfPrefixNotPresent);
1455 bool fOnlyIfPrefixNotPresent =
false);
1496 bool m_traceSelects;
1502 bool m_quietConflictWarnings;
1526 const Locator& locator,
1541 unsigned long m_uniqueNSValue;
1553 m_topLevelParams.
clear();
1559 generateCDATASection()
const
1561 if (m_hasCDATASectionElements ==
false)
1567 assert(m_cdataStack.
empty() ==
false);
1569 return m_cdataStack.
back();
1576 setMustFlushPendingStartDocument(
true);
1592 fireCharacterGenerateEvent(
1597 fireCharacterGenerateEvent(
1602 fireCharacterGenerateEvent(
1607 fireCharacterGenerateEvent(
1608 const XalanDOMChar* ch,
1614 checkDefaultNamespace(
1621 const Locator* theLocator,
1627 const Locator* theLocator,
1633 const Locator* theLocator,
1665 XalanDOMStringPointerVectorType m_attributeNamesVisited;
1667 bool m_hasCDATASectionElements;
1671 ParamMapType m_stylesheetParams;
1674 installFunctions(MemoryManager& theManager);
1677 uninstallFunctions();
1703 XALAN_CPP_NAMESPACE_END
1707 #endif // XALAN_XSLTENGINEIMPL_HEADER_GUARD
void setPendingAttributesImpl(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
XERCES_CPP_NAMESPACE_QUALIFIER DocumentHandler DocumentHandlerType
XalanVector< const XalanDOMString * > XalanDOMStringPointerVectorType
Function::XObjectArgVectorType XObjectArgVectorType
MemoryManager & getMemoryManager() const
void setPendingElementName(const XalanDOMChar *elementName)
bool getQuietConflictWarnings() const
Whether to warn about pattern match conflicts.
bool operator()(const XalanDOMString *theString) const
bool getHasPendingStartDocument() const
virtual void fireSelectEvent(const SelectionEvent &se)=0
Fire a selection event.
StylesheetExecutionContext::ParamVectorType ParamVectorType
This class defines an interface for classes that resolve namespace prefixes to their URIs.
virtual void setDiagnosticsOutput(PrintWriter *pw)=0
If this is set, diagnostics will be written to the m_diagnosticsPrintWriter stream.
Class to hold XPath return types.
AttributeListImpl & getPendingAttributesImpl()
Get the list of attributes yet to be processed.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
bool operator()(const XalanDOMString *theLHS, const XalanDOMString *theRHS) const
virtual void fireTraceEvent(const TracerEvent &te)=0
Fire a trace event.
virtual void setFormatterListener(FormatterListener *flistener)=0
Set the current formatter listener.
void setPendingElementNameImpl(const XalanDOMChar *elementName)
Changes the currently pending element name.
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)
This is the parent class of events generated for tracing the progress of the XSL processor.
virtual XalanNode * getSourceTreeFromInput(const XSLTInputSource &inputSource)=0
Given an input source, get the source tree.
virtual size_type getTraceListeners() const =0
Determine the number of trace listeners.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
The implementation of the default error handling for Xalan.
void setFormatterListenerImpl(FormatterListener *flistener)
XObjectFactory & m_xobjectFactory
const XalanDOMString & getPendingElementNameImpl() const
Retrieve name of the pending element currently being processed.
XalanDOMString & getPendingElementNameImpl()
Retrieve name of the pending element currently being processed.
This is the class for events generated by the XSL processor after it generates a new node in the resu...
#define XALAN_XSLT_EXPORT
void clearTopLevelParams()
Reset the vector of top level parameters.
int compare(const XalanDOMString &theString) const
FindStringPointerFunctor(const XalanDOMString &theString)
XPathExecutionContext::GetCachedString ECGetCachedString
XalanVector< TraceListener * > TraceListenerVectorType
virtual void traceSelect(StylesheetExecutionContext &executionContext, const ElemTemplateElement &theStylesheetElement, const NodeRefListBase &nl, const XPath *xpath) const =0
Compose a diagnostic trace of the current selection.
const XPathProcessorPtrType m_xpathProcessor
XPathConstructionContext::GetCachedString CCGetCachedString
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
virtual void addTraceListener(TraceListener *tl)=0
Add a trace listener for the purposes of debugging and diagnosis.
virtual const XalanDOMString & getURI() const =0
Retrieve the base URI for the resolver.
void setMustFlushPendingStartDocument(bool b)
virtual const StylesheetRoot * getStylesheetRoot() const =0
Retrieve the root stylesheet.
virtual void getUniqueNamespaceValue(XalanDOMString &theValue)=0
Generate a random namespace prefix guaranteed to be unique.
XPathFactory & m_xpathFactory
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMString &namespaceVal)
Add a namespace declaration to the namespace stack.
bool getHasPendingStartDocumentImpl() const
void setHasPendingStartDocumentImpl(bool b)
virtual void resolveTopLevelParams(StylesheetExecutionContext &executionContext)=0
Resolve the params that were pushed by the caller.
XalanVector< bool > BoolVectorType
This class represents the base stylesheet or an "import" stylesheet.
virtual void fireGenerateEvent(const GenerateEvent &ge)=0
Fire a generate event.
void pushLocatorOnStack(const Locator *locator)
Push a locator on to the locator stack.
bool getMustFlushPendingStartDocument() const
void addResultAttribute(const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
static const XalanDOMString & getXSLNameSpaceURL()
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
const XalanDOMChar * c_str() const
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER InputSource InputSourceType
An default implementation of an abtract class which provides support for constructing the internal re...
void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
Replace the contents of a pending attribute.
void setPendingElementName(const XalanDOMString &elementName)
Changes the currently pending element name.
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
virtual StylesheetRoot * processStylesheet(const XSLTInputSource &stylesheetSource, StylesheetConstructionContext &constructionContext)=0
Given a stylesheet input source, compile the stylesheet into an internal representation.
XPathEnvSupport & getXPathEnvSupport()
Retrieve the XPath environment support object.
virtual void removeTraceListener(TraceListener *tl)=0
Remove a trace listener.
void outputResultTreeFragment(const XObject &theTree, bool outputTextNodesOnly, const Locator *locator)
Given a result tree fragment, walk the tree and output it to the result stream.
void addResultAttribute(const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
void setProblemListener(ProblemListener *l)
Set the problem listener property.
bool getMustFlushPendingStartDocumentImpl() const
This class handles the creation of XObjects and manages their lifetime.
XalanDOMString m_resultNameSpaceURL
The URL that belongs to the result namespace.
void popLocatorStack()
Pop the locator from the top of the locator stack.
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, size_type len)
Add a namespace declaration to the namespace stack.
const AttributeListImpl & getPendingAttributesImpl() const
Get the list of attributes yet to be processed.
virtual bool getTraceSelects() const =0
If this is set to true, simple traces of template calls are made.
This is the abstract class that the XSL processor uses when it has a problem of some kind,...
void setMustFlushPendingStartDocumentImpl(bool b)
virtual void process(const XSLTInputSource &inputSource, const XSLTInputSource &stylesheetSource, XSLTResultTarget &outputTarget, StylesheetConstructionContext &constructionContext, StylesheetExecutionContext &executionContext)=0
Transform the source tree to the output in the given result tree target.
virtual void setStylesheetRoot(const StylesheetRoot *theStylesheet)=0
Set the root stylesheet.
virtual const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix) const =0
Retrieve a namespace corresponding to a prefix.
XalanMap< XalanDOMString, XalanParamHolder > ParamMapType
void pushOutputContext(FormatterListener *theListener)
XALAN_CPP_NAMESPACE_BEGIN XALAN_USING_XERCES(Locator)
virtual void reset()=0
Reset the state.
const AttributeListType & getPendingAttributes() const
Get the list of attributes yet to be processed.
Class to hold XObjectPtr return types.
virtual XMLParserLiaison & getXMLParserLiaison() const =0
Get the XML Parser Liaison that this processor uses.
Local implementation of NodeRefList.
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
XPathFactory & getXPathFactory()
Get the factory for making xpaths.
void setPendingAttributes(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
XalanMemMgrAutoPtr< XPathProcessor > XPathProcessorPtrType
void setPendingElementNameImpl(const XalanDOMString &elementName)
Changes the currently pending element name.
void setHasPendingStartDocument(bool b)
This is an interface for an XSLT Processor engine.
ProblemListener * getProblemListener() const
Get the problem listener property.
XalanDOMString m_resultNameSpacePrefix
The namespace that the result tree conforms to.
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
MemoryManager & getMemoryManager()
const Locator * getLocatorFromStack() const
Get the locator from the top of the locator stack.
const XalanDOMString & getPendingElementName() const
Retrieve name of the pending element currently being processed.
BoolVectorType m_cdataStack
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text.
FormatterListener * getFormatterListenerImpl() const
bool isElementPending() const
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
virtual void setStylesheetParam(const XalanDOMString &key, XObjectPtr value)=0
Set a top-level parameter, which the stylesheet can access with a top-level xsl:param.
XPathProcessor & getXPathProcessor()
Get the XPath processor object.
virtual const XalanDocumentFragment & rtree() const
Cast result object to a result tree fragment.
virtual FormatterListener * getFormatterListener() const =0
Get the current formatter listener.
virtual void clearStylesheetParams()=0
Clear any stylesheet params.
XalanVector< const Locator * > LocatorStack
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison,...
static const XalanDOMString & getXalanXSLNameSpaceURL()
Special Xalan namespace for built-in extensions.
virtual void setQuietConflictWarnings(bool b)=0
If the quietConflictWarnings property is set to true, warnings about pattern conflicts won't be print...
virtual void setExecutionContext(StylesheetExecutionContext *theExecutionContext)=0
Set the execution context.
Interpreting class diagrams
Doxygen and
GraphViz are
used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.
|
|