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,
205 XMLParserLiaison& parserLiaison,
206 XPathEnvSupport& xpathEnvSupport,
207 DOMSupport& domSupport,
209 XPathFactory& xpathFactory);
217 return m_xpathConstructionContext.getMemoryManager();
223 return m_xpathConstructionContext.getMemoryManager();
231 initialize(MemoryManager& theManager);
244 eClassification classification,
246 const Locator* locator,
252 eClassification classification,
260 XSLTResultTarget& outputTarget,
261 StylesheetConstructionContext& constructionContext,
267 XSLTResultTarget& outputTarget,
270 virtual StylesheetRoot*
273 StylesheetConstructionContext& constructionContext);
275 virtual StylesheetRoot*
278 StylesheetConstructionContext& constructionContext);
286 virtual XMLParserLiaison&
287 getXMLParserLiaison()
const;
303 clearStylesheetParams();
306 getFormatterListener()
const;
314 getTraceListeners()
const;
323 fireGenerateEvent(
const GenerateEvent& ge);
332 getTraceSelects()
const;
335 setTraceSelects(
bool b);
342 const XPath* xpath)
const;
345 setQuietConflictWarnings(
bool b);
348 setDiagnosticsOutput(PrintWriter* pw);
386 DocumentHandler* docHandler,
388 ErrorHandler* theErrorHandler = 0);
403 const InputSource& inputSource,
404 DocumentHandler* docHandler,
406 ErrorHandler* theErrorHandler = 0);
421 getStylesheetFromPIURL(
426 StylesheetConstructionContext& constructionContext);
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);
780 const XObject& value,
781 bool outputTextNodesOnly,
782 const Locator* locator);
794 const XObject& theTree,
795 bool outputTextNodesOnly,
796 const Locator* locator)
798 outputResultTreeFragment(
813 outputResultTreeFragment(
815 bool outputTextNodesOnly,
816 const Locator* locator);
823 virtual const StylesheetRoot*
824 getStylesheetRoot()
const;
832 setStylesheetRoot(
const StylesheetRoot* theStylesheet);
851 return s_XSLNameSpaceURL;
862 return s_XalanNamespaceURL;
873 return m_quietConflictWarnings;
892 getResultPrefixForNamespace(
const XalanDOMString& theNamespace)
const;
929 const PrefixResolver& resolver);
938 returnXPath(
const XPath* xpath);
946 copyNamespaceAttributes(
const XalanNode& src);
973 const PrefixResolver& prefixResolver,
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);
1433 const XalanText& node,
1434 bool overrideStrip);
1441 pendingAttributesHasDefaultNS()
const;
1449 bool fOnlyIfPrefixNotPresent);
1455 bool fOnlyIfPrefixNotPresent =
false);
1461 LocatorStack m_stylesheetLocatorStack;
1476 const StylesheetRoot* m_stylesheetRoot;
1496 bool m_traceSelects;
1502 bool m_quietConflictWarnings;
1507 PrintWriter* m_diagnosticsPrintWriter;
1513 TraceListenerVectorType m_traceListeners;
1526 const Locator& locator,
1541 unsigned long m_uniqueNSValue;
1543 ParamVectorType m_topLevelParams;
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,
1637 XMLParserLiaison& m_parserLiaison;
1639 XPathEnvSupport& m_xpathEnvSupport;
1641 DOMSupport& m_domSupport;
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
XObjectFactory & m_xobjectFactory
XPathFactory & m_xpathFactory
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMString &namespaceVal)
Add a namespace declaration to the namespace stack.
XPathExecutionContext::GetCachedString ECGetCachedString
bool isElementPending() const
ProblemListener * getProblemListener() const
Get the problem listener property.
void clearTopLevelParams()
Reset the vector of top level parameters.
const AttributeListType & getPendingAttributes() const
Get the list of attributes yet to be processed.
bool getQuietConflictWarnings() const
Whether to warn about pattern match conflicts.
FindStringPointerFunctor(const XalanDOMString &theString)
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.
static const XalanDOMString & getXalanXSLNameSpaceURL()
Special Xalan namespace for built-in extensions.
StylesheetExecutionContext::ParamVectorType ParamVectorType
const XPathProcessorPtrType m_xpathProcessor
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
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...
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...
void setFormatterListenerImpl(FormatterListener *flistener)
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...
const Locator * getLocatorFromStack() const
Get the locator from the top of the locator stack.
Class to hold XObjectPtr return types.
void setPendingElementName(const XalanDOMChar *elementName)
This is the abstract class that the XSL processor uses when it has a problem of some kind...
This is the class for events generated by the XSL processor after it generates a new node in the resu...
XalanDOMString m_resultNameSpaceURL
The URL that belongs to the result namespace.
void popLocatorStack()
Pop the locator from the top of the locator stack.
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison...
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, size_type len)
Add a namespace declaration to the namespace stack.
bool getMustFlushPendingStartDocumentImpl() const
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...
int compare(const XalanDOMString &theString) const
XPathEnvSupport & getXPathEnvSupport()
Retrieve the XPath environment support object.
AttributeListImpl & getPendingAttributesImpl()
Get the list of attributes yet to be processed.
void setPendingAttributes(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
MemoryManager & getMemoryManager() const
Local implementation of NodeRefList.
XalanMap< XalanDOMString, XalanParamHolder > ParamMapType
const XalanDOMString & getPendingElementNameImpl() const
Retrieve name of the pending element currently being processed.
void pushOutputContext(FormatterListener *theListener)
MemoryManager & getMemoryManager()
XalanVector< TraceListener * > TraceListenerVectorType
bool getHasPendingStartDocument() const
XPathConstructionContext::GetCachedString CCGetCachedString
const AttributeListImpl & getPendingAttributesImpl() const
Get the list of attributes yet to be processed.
void pushLocatorOnStack(const Locator *locator)
Push a locator on to the locator stack.
bool operator()(const XalanDOMString *theString) const
XalanDOMString & getPendingElementNameImpl()
Retrieve name of the pending element currently being processed.
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
const XalanDOMChar * c_str() const
void setHasPendingStartDocumentImpl(bool b)
BoolVectorType m_cdataStack
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text...
XalanVector< const Locator * > LocatorStack
const XalanDOMString & getPendingElementName() const
Retrieve name of the pending element currently being processed.
This class defines an interface for classes that resolve namespace prefixes to their URIs...
void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
Replace the contents of a pending attribute.
Class to hold XPath return types.
This is the parent class of events generated for tracing the progress of the XSL processor.
void setPendingElementNameImpl(const XalanDOMString &elementName)
Changes the currently pending element name.
void setMustFlushPendingStartDocument(bool b)
void setPendingAttributesImpl(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
XERCES_CPP_NAMESPACE_QUALIFIER DocumentHandler DocumentHandlerType
Function::XObjectArgVectorType XObjectArgVectorType
#define XALAN_XSLT_EXPORT
FormatterListener * getFormatterListenerImpl() const
virtual const XalanDocumentFragment & rtree() const
Cast result object to a result tree fragment.
void setProblemListener(ProblemListener *l)
Set the problem listener property.
The implementation of the default error handling for Xalan.
XalanVector< bool > BoolVectorType
static const XalanDOMString & getXSLNameSpaceURL()
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
bool operator()(const XalanDOMString *theLHS, const XalanDOMString *theRHS) const
XPathProcessor & getXPathProcessor()
Get the XPath processor object.
void setPendingElementName(const XalanDOMString &elementName)
Changes the currently pending element name.
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
XalanVector< const XalanDOMString * > XalanDOMStringPointerVectorType
bool getHasPendingStartDocumentImpl() const
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
void setMustFlushPendingStartDocumentImpl(bool b)
This is an interface for an XSLT Processor engine.
This class represents the base stylesheet or an "import" stylesheet.
An default implementation of an abtract class which provides support for constructing the internal re...
XALAN_CPP_NAMESPACE_BEGIN XALAN_USING_XERCES(Locator)
bool getMustFlushPendingStartDocument() const
XPathFactory & getXPathFactory()
Get the factory for making xpaths.
This class handles the creation of XObjects and manages their lifetime.
XalanMemMgrAutoPtr< XPathProcessor > XPathProcessorPtrType
void setPendingElementNameImpl(const XalanDOMChar *elementName)
Changes the currently pending element name.
void setHasPendingStartDocument(bool b)
XalanDOMString m_resultNameSpacePrefix
The namespace that the result tree conforms to.