16 #if !defined(XALAN_XSLTENGINEIMPL_HEADER_GUARD)
17 #define XALAN_XSLTENGINEIMPL_HEADER_GUARD
41 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
78 XALAN_DECLARE_XERCES_CLASS(InputSource)
79 XALAN_DECLARE_XERCES_CLASS(DocumentHandler)
83 XALAN_CPP_NAMESPACE_BEGIN
133 if (theLHS == 0 && theRHS != 0)
137 else if (theRHS == 0)
143 return theLHS->
compare(*theRHS) < 0 ?
true :
false;
164 assert(theString != 0);
166 return *theString == m_string;
197 XMLParserLiaison& parserLiaison,
198 XPathEnvSupport& xpathEnvSupport,
199 DOMSupport& domSupport,
201 XPathFactory& xpathFactory);
209 return m_xpathConstructionContext.getMemoryManager();
231 XSLTResultTarget& outputTarget,
232 StylesheetConstructionContext& constructionContext,
238 XSLTResultTarget& outputTarget,
241 virtual StylesheetRoot*
244 StylesheetConstructionContext& constructionContext);
246 virtual StylesheetRoot*
249 StylesheetConstructionContext& constructionContext);
257 virtual XMLParserLiaison&
258 getXMLParserLiaison()
const;
274 getFormatterListener()
const;
282 getTraceListeners()
const;
291 fireGenerateEvent(
const GenerateEvent& ge);
300 getTraceSelects()
const;
303 setTraceSelects(
bool b);
310 const XPath* xpath)
const;
313 setQuietConflictWarnings(
bool b);
316 setDiagnosticsOutput(PrintWriter* pw);
354 DocumentHandlerType* docHandler,
370 const InputSourceType& inputSource,
371 DocumentHandlerType* docHandler,
387 getStylesheetFromPIURL(
392 StylesheetConstructionContext& constructionContext);
411 addResultNamespaceDecl(
413 namespaceVal.
c_str(),
427 const XalanDOMChar* namespaceVal,
430 m_resultNamespacesStack.addDeclaration(
451 bool fromCopy =
false,
476 const XalanDOMChar* value,
477 bool fromCopy =
false,
504 const XalanDOMChar* value,
506 bool fromCopy =
false,
521 const XalanDOMChar* value,
522 bool fromCopy =
false,
525 assert(m_outputContextStack.empty() ==
false);
528 getPendingAttributesImpl(),
548 bool fromCopy =
false,
551 assert(m_outputContextStack.empty() ==
false);
554 getPendingAttributesImpl(),
567 reportDuplicateNamespaceNodeError(
582 const XalanDOMChar* name,
586 endElement(
const XalanDOMChar* name);
590 const XalanDOMChar* ch,
595 const XalanDOMChar* ch,
599 processingInstruction(
600 const XalanDOMChar* target,
601 const XalanDOMChar* data);
615 const XalanDOMChar* ch,
642 startElement(
const XalanDOMChar* name);
655 const XalanDOMChar* ch,
681 comment(
const XalanDOMChar* data);
690 entityReference(
const XalanDOMChar* data);
701 const XalanDOMChar* ch,
715 bool cloneTextNodesOnly,
733 bool shouldCloneAttributes,
734 bool cloneTextNodesOnly,
746 const XObject& value,
747 bool outputTextNodesOnly,
760 const XObject& theTree,
761 bool outputTextNodesOnly,
764 outputResultTreeFragment(theTree.
rtree(), outputTextNodesOnly, locator);
776 outputResultTreeFragment(
778 bool outputTextNodesOnly,
786 virtual const StylesheetRoot*
787 getStylesheetRoot()
const;
795 setStylesheetRoot(
const StylesheetRoot* theStylesheet);
814 return s_XSLNameSpaceURL;
825 return s_XalanNamespaceURL;
836 return m_quietConflictWarnings;
894 getResultPrefixForNamespace(
const XalanDOMString& theNamespace)
const;
931 const PrefixResolver& resolver);
940 returnXPath(
const XPath* xpath);
948 copyNamespaceAttributes(
const XalanNode& src);
975 const PrefixResolver& prefixResolver,
1002 copyAttributeToTarget(
1015 return m_xpathFactory;
1026 return *m_xpathProcessor.get();
1044 return m_xpathEnvSupport;
1058 m_problemListener = l;
1072 return m_problemListener;
1083 m_outputContextStack.pushContext(theListener);
1092 m_outputContextStack.popContext();
1102 return getHasPendingStartDocumentImpl();
1112 setHasPendingStartDocumentImpl(b);
1122 return getMustFlushPendingStartDocumentImpl();
1132 setMustFlushPendingStartDocumentImpl(b);
1143 return getPendingAttributesImpl();
1154 getPendingAttributesImpl() = pendingAttributes;
1166 const XalanDOMChar* theName,
1167 const XalanDOMChar* theNewType,
1168 const XalanDOMChar* theNewValue)
1172 getPendingAttributesImpl().addAttribute(theName, theNewType, theNewValue);
1178 return length(getPendingElementNameImpl()) != 0 ?
true :
false;
1189 return getPendingElementNameImpl();
1200 setPendingElementNameImpl(elementName);
1206 setPendingElementNameImpl(elementName);
1217 return m_stylesheetLocatorStack.empty() ==
true ? 0 : m_stylesheetLocatorStack.back();
1228 m_stylesheetLocatorStack.push_back(locator);
1237 if (m_stylesheetLocatorStack.empty() ==
false)
1239 m_stylesheetLocatorStack.pop_back();
1253 return m_outputContextStack.getPendingAttributes();
1264 return m_outputContextStack.getPendingAttributes();
1275 getPendingAttributesImpl() = pendingAttributes;
1286 return m_outputContextStack.getPendingElementName();
1297 return m_outputContextStack.getPendingElementName();
1308 m_outputContextStack.getPendingElementName() = elementName;
1319 assert(elementName != 0);
1321 m_outputContextStack.getPendingElementName() = elementName;
1331 return m_outputContextStack.getHasPendingStartDocument();
1341 m_outputContextStack.getHasPendingStartDocument() = b;
1351 return m_outputContextStack.getMustFlushPendingStartDocument();
1361 m_outputContextStack.getMustFlushPendingStartDocument() = b;
1367 return m_outputContextStack.getFormatterListener();
1373 m_outputContextStack.getFormatterListener() = flistener;
1395 copyAttributesToAttList(
1423 warnCopyTextNodesOnly(
1435 const XalanText& node,
1436 bool overrideStrip);
1443 pendingAttributesHasDefaultNS()
const;
1451 bool fOnlyIfPrefixNotPresent);
1457 bool fOnlyIfPrefixNotPresent =
false);
1463 LocatorStack m_stylesheetLocatorStack;
1478 const StylesheetRoot* m_stylesheetRoot;
1498 bool m_traceSelects;
1504 bool m_quietConflictWarnings;
1509 PrintWriter* m_diagnosticsPrintWriter;
1515 TraceListenerVectorType m_traceListeners;
1538 unsigned long m_uniqueNSValue;
1540 ParamVectorType m_topLevelParams;
1550 m_topLevelParams.
clear();
1556 generateCDATASection()
const
1558 if (m_hasCDATASectionElements ==
false)
1564 assert(m_cdataStack.
empty() ==
false);
1566 return m_cdataStack.
back();
1573 setMustFlushPendingStartDocument(
true);
1589 fireCharacterGenerateEvent(
1594 fireCharacterGenerateEvent(
1599 fireCharacterGenerateEvent(
1604 fireCharacterGenerateEvent(
1605 const XalanDOMChar* ch,
1611 checkDefaultNamespace(
1618 XMLParserLiaison& m_parserLiaison;
1620 XPathEnvSupport& m_xpathEnvSupport;
1622 DOMSupport& m_domSupport;
1646 XalanDOMStringPointerVectorType m_attributeNamesVisited;
1648 bool m_hasCDATASectionElements;
1656 uninstallFunctions();
1682 XALAN_CPP_NAMESPACE_END
1686 #endif // XALAN_XSLTENGINEIMPL_HEADER_GUARD
XObjectFactory & m_xobjectFactory
Definition: XSLTEngineImpl.hpp:1403
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1111
Definition: XalanNode.hpp:44
size_type length() const
Definition: XalanDOMString.hpp:209
Definition: XalanText.hpp:38
XPathFactory & m_xpathFactory
Definition: XSLTEngineImpl.hpp:1400
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMString &namespaceVal)
Add a namespace declaration to the namespace stack.
Definition: XSLTEngineImpl.hpp:407
void outputResultTreeFragment(const XObject &theTree, bool outputTextNodesOnly, const LocatorType *locator)
Given a result tree fragment, walk the tree and output it to the result stream.
Definition: XSLTEngineImpl.hpp:759
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
Definition: AttributeListImpl.hpp:39
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
bool isElementPending() const
Definition: XSLTEngineImpl.hpp:1176
ProblemListener * getProblemListener() const
Get the problem listener property.
Definition: XSLTEngineImpl.hpp:1070
void clearTopLevelParams()
Reset the vector of top level parameters.
Definition: XSLTEngineImpl.hpp:1548
const AttributeListType & getPendingAttributes() const
Get the list of attributes yet to be processed.
Definition: XSLTEngineImpl.hpp:1141
bool getQuietConflictWarnings() const
Whether to warn about pattern match conflicts.
Definition: XSLTEngineImpl.hpp:834
Definition: XalanAttr.hpp:38
void addResultAttribute(const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const LocatorType *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack...
Definition: XSLTEngineImpl.hpp:519
FindStringPointerFunctor(const XalanDOMString &theString)
Definition: XSLTEngineImpl.hpp:156
Definition: ElemTemplateElement.hpp:74
Definition: DOMSupport.hpp:39
static const XalanDOMString & getXalanXSLNameSpaceURL()
Special Xalan namespace for built-in extensions.
Definition: XSLTEngineImpl.hpp:823
StylesheetExecutionContext::ParamVectorType ParamVectorType
Definition: XSLTEngineImpl.hpp:176
Definition: AttributeListImpl.hpp:47
Definition: XalanDocumentFragment.hpp:38
const XPathProcessorPtrType m_xpathProcessor
Definition: XSLTEngineImpl.hpp:1406
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
Definition: StylesheetRoot.hpp:61
const LocatorType * getLocatorFromStack() const
Get the locator from the top of the locator stack.
Definition: XSLTEngineImpl.hpp:1215
XERCES_CPP_NAMESPACE_QUALIFIER InputSource InputSourceType
Definition: XMLParserLiaison.hpp:44
NodeType
Definition: XalanNode.hpp:53
reference back()
Definition: XalanVector.hpp:673
Definition: StylesheetExecutionContext.hpp:104
Definition: XalanElement.hpp:42
void setFormatterListenerImpl(FormatterListener *flistener)
Definition: XSLTEngineImpl.hpp:1371
eClassification
Severity of problem.
Definition: ProblemListener.hpp:59
Class to hold XObjectPtr return types.
Definition: XObject.hpp:584
bool empty() const
Definition: XalanVector.hpp:636
void setPendingElementName(const XalanDOMChar *elementName)
Definition: XSLTEngineImpl.hpp:1204
This is the abstract class that the XSL processor uses when it has a problem of some kind...
Definition: ProblemListener.hpp:49
XalanMemMgrAutoPtr< XPathProcessor, true > XPathProcessorPtrType
Definition: XSLTEngineImpl.hpp:174
This is the class for events generated by the XSL processor after it generates a new node in the resu...
Definition: GenerateEvent.hpp:50
Definition: XPathExecutionContext.hpp:72
XalanDOMString m_resultNameSpaceURL
The URL that belongs to the result namespace.
Definition: XSLTEngineImpl.hpp:1387
XPathExecutionContext::GetAndReleaseCachedString ECGetAndReleaseCachedString
Definition: XSLTEngineImpl.hpp:178
void popLocatorStack()
Pop the locator from the top of the locator stack.
Definition: XSLTEngineImpl.hpp:1235
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison...
Definition: XSLTEngineImpl.hpp:122
MemoryManagerType & getMemoryManager()
Definition: XSLTEngineImpl.hpp:207
bool getMustFlushPendingStartDocumentImpl() const
Definition: XSLTEngineImpl.hpp:1349
Definition: PrintWriter.hpp:35
int compare(const XalanDOMString &theString) const
Definition: XalanDOMString.hpp:583
XPathEnvSupport & getXPathEnvSupport()
Retrieve the XPath environment support object.
Definition: XSLTEngineImpl.hpp:1042
AttributeListImpl & getPendingAttributesImpl()
Get the list of attributes yet to be processed.
Definition: XSLTEngineImpl.hpp:1262
void setPendingAttributes(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
Definition: XSLTEngineImpl.hpp:1152
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:42
const XalanDOMString & getPendingElementNameImpl() const
Retrieve name of the pending element currently being processed.
Definition: XSLTEngineImpl.hpp:1284
void pushOutputContext(FormatterListener *theListener)
Definition: XSLTEngineImpl.hpp:1081
XalanVector< TraceListener * > TraceListenerVectorType
Definition: XSLTEngineImpl.hpp:149
bool getHasPendingStartDocument() const
Definition: XSLTEngineImpl.hpp:1100
const AttributeListImpl & getPendingAttributesImpl() const
Get the list of attributes yet to be processed.
Definition: XSLTEngineImpl.hpp:1251
bool operator()(const XalanDOMString *theString) const
Definition: XSLTEngineImpl.hpp:162
XalanDOMString & getPendingElementNameImpl()
Retrieve name of the pending element currently being processed.
Definition: XSLTEngineImpl.hpp:1295
Definition: XPathEnvSupport.hpp:62
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
const XalanDOMChar * c_str() const
Definition: XalanDOMString.hpp:314
void setHasPendingStartDocumentImpl(bool b)
Definition: XSLTEngineImpl.hpp:1339
BoolVectorType m_cdataStack
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text...
Definition: XSLTEngineImpl.hpp:1412
const XalanDOMString & getPendingElementName() const
Retrieve name of the pending element currently being processed.
Definition: XSLTEngineImpl.hpp:1187
Definition: XSLTResultTarget.hpp:47
This class defines an interface for classes that resolve namespace prefixes to their URIs...
Definition: PrefixResolver.hpp:37
XalanVector< const LocatorType * > LocatorStack
Definition: XSLTEngineImpl.hpp:148
void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
Replace the contents of a pending attribute.
Definition: XSLTEngineImpl.hpp:1165
Definition: XMLParserLiaison.hpp:54
Definition: TraceListener.hpp:34
Class to hold XPath return types.
Definition: XObject.hpp:61
This is the parent class of events generated for tracing the progress of the XSL processor.
Definition: TracerEvent.hpp:47
Definition: XalanDocument.hpp:51
void setPendingElementNameImpl(const XalanDOMString &elementName)
Changes the currently pending element name.
Definition: XSLTEngineImpl.hpp:1306
void setMustFlushPendingStartDocument(bool b)
Definition: XSLTEngineImpl.hpp:1130
void setPendingAttributesImpl(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
Definition: XSLTEngineImpl.hpp:1273
Definition: XalanNamespacesStack.hpp:43
XERCES_CPP_NAMESPACE_QUALIFIER DocumentHandler DocumentHandlerType
Definition: StylesheetConstructionContext.hpp:50
Function::XObjectArgVectorType XObjectArgVectorType
Definition: XSLTEngineImpl.hpp:175
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:25
FormatterListener * getFormatterListenerImpl() const
Definition: XSLTEngineImpl.hpp:1365
virtual const XalanDocumentFragment & rtree() const
Cast result object to a result tree fragment.
void setProblemListener(ProblemListener *l)
Set the problem listener property.
Definition: XSLTEngineImpl.hpp:1056
The implementation of the default error handling for Xalan.
Definition: ProblemListenerDefault.hpp:38
Definition: XPathConstructionContext.hpp:116
XalanVector< bool > BoolVectorType
Definition: XSLTEngineImpl.hpp:152
XPathConstructionContext::GetAndReleaseCachedString CCGetAndReleaseCachedString
Definition: XSLTEngineImpl.hpp:177
void pushLocatorOnStack(const LocatorType *locator)
Push a locator on to the locator stack.
Definition: XSLTEngineImpl.hpp:1226
static const XalanDOMString & getXSLNameSpaceURL()
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
Definition: XSLTEngineImpl.hpp:812
Definition: XPathExecutionContext.hpp:430
Definition: XPathProcessor.hpp:47
Definition: OutputContextStack.hpp:47
bool operator()(const XalanDOMString *theLHS, const XalanDOMString *theRHS) const
Definition: XSLTEngineImpl.hpp:129
XPathProcessor & getXPathProcessor()
Get the XPath processor object.
Definition: XSLTEngineImpl.hpp:1024
void setPendingElementName(const XalanDOMString &elementName)
Changes the currently pending element name.
Definition: XSLTEngineImpl.hpp:1198
Definition: XPathFactory.hpp:39
Definition: XalanDOMString.hpp:42
Definition: SelectionEvent.hpp:45
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:277
XalanVector< const XalanDOMString * > XalanDOMStringPointerVectorType
Definition: XSLTEngineImpl.hpp:150
bool getHasPendingStartDocumentImpl() const
Definition: XSLTEngineImpl.hpp:1329
void addResultAttribute(const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const LocatorType *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack...
Definition: XSLTEngineImpl.hpp:545
Definition: StylesheetConstructionContext.hpp:73
void setMustFlushPendingStartDocumentImpl(bool b)
Definition: XSLTEngineImpl.hpp:1359
This is an interface for an XSLT Processor engine.
Definition: XSLTProcessor.hpp:79
Definition: XalanSourceTreeDocument.hpp:73
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:84
void clear()
Definition: XalanVector.hpp:788
An default implementation of an abtract class which provides support for constructing the internal re...
Definition: XPathConstructionContextDefault.hpp:49
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, XalanDOMString::size_type len)
Add a namespace declaration to the namespace stack.
Definition: XSLTEngineImpl.hpp:425
bool getMustFlushPendingStartDocument() const
Definition: XSLTEngineImpl.hpp:1120
unsigned int size_type
Definition: XalanDOMString.hpp:53
Definition: XSLTEngineImpl.hpp:126
void popOutputContext()
Definition: XSLTEngineImpl.hpp:1090
XPathFactory & getXPathFactory()
Get the factory for making xpaths.
Definition: XSLTEngineImpl.hpp:1013
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const LocatorType *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack...
Definition: XSLTEngineImpl.hpp:473
This class handles the creation of XObjects and manages their lifetime.
Definition: XObjectFactory.hpp:51
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const LocatorType *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack...
Definition: XSLTEngineImpl.hpp:447
void setPendingElementNameImpl(const XalanDOMChar *elementName)
Changes the currently pending element name.
Definition: XSLTEngineImpl.hpp:1317
void setHasPendingStartDocument(bool b)
Definition: XSLTEngineImpl.hpp:1110
XalanDOMString m_resultNameSpacePrefix
The namespace that the result tree conforms to.
Definition: XSLTEngineImpl.hpp:1382
Definition: XSLTEngineImpl.hpp:154