16 #if !defined(STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680)
17 #define STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
41 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
55 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
73 XALAN_CPP_NAMESPACE_BEGIN
93 #if defined(XALAN_STRICT_ANSI_HEADERS)
167 m_xpathExecutionContextDefault.setXPathEnvSupport(theSupport);
178 m_xpathExecutionContextDefault.setDOMSupport(theDOMSupport);
189 m_xpathExecutionContextDefault.setXObjectFactory(theXObjectFactory);
203 m_xsltProcessor = theProcessor;
209 return m_usePerInstanceDocumentFactory;
215 m_usePerInstanceDocumentFactory = fValue;
243 getCopyTextNodesOnly()
const;
246 pushCopyTextNodesOnly(
bool copyTextNodesOnly);
249 popCopyTextNodesOnly();
251 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
253 pushProcessCurrentAttribute(
bool processAttribute);
256 popProcessCurrentAttribute();
259 pushSkipElementAttributes(
bool skipAttributes);
262 getSkipElementAttributes()
const;
265 popSkipElementAttributes();
268 pushExecuteIf(
bool executeIf);
275 getRootDocument()
const;
284 getCurrentMode()
const;
293 getCurrentTemplate()
const;
299 popCurrentTemplate();
306 const XalanDOMChar* theName,
307 const XalanDOMChar* theNewType,
308 const XalanDOMChar* theNewValue);
324 const XalanDOMChar* value);
351 setIndent(
int indentAmount);
371 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
406 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
428 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
429 virtual void beginParams();
431 virtual void endParams();
449 getGlobalStackFrameIndex()
const;
452 getCurrentStackFrameIndex()
const;
455 pushCurrentStackFrameIndex(
int currentStackFrameIndex = -1);
458 popCurrentStackFrameIndex();
474 const XalanDOMChar* ch,
480 const XalanDOMChar* ch,
485 comment(
const XalanDOMChar* data);
489 const XalanDOMChar* target,
490 const XalanDOMChar* data);
505 bool shouldCloneAttributes,
508 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
510 beginCreateXResultTreeFrag(
515 endCreateXResultTreeFrag();
526 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
528 createXResultTreeFrag(
556 popElementRecursionStack();
562 getEscapeURLs()
const;
565 setEscapeURLs(eEscapeURLs value);
568 getOmitMETATag()
const;
571 setOmitMETATag(eOmitMETATag value);
574 createFormatterToXML(
577 bool doIndent =
false,
578 int indent = eDefaultXMLIndentAmount,
587 createFormatterToHTML(
593 bool doIndent =
true,
594 int indent = eDefaultHTMLIndentAmount,
595 bool escapeURLs =
true,
596 bool omitMetaTag =
false);
599 createFormatterToText(
603 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
614 virtual XalanNumberFormatAutoPtr
615 createXalanNumberFormat();
635 return s_defaultXalanNumberFormatFactory;
645 static XalanNumberFormatFactory*
646 installXalanNumberFormatFactory(XalanNumberFormatFactory* theFactory);
650 getTraceListeners()
const;
662 getTraceSelects()
const;
685 const XalanDOMChar* theLHS,
686 const XalanDOMChar* theRHS,
691 const XalanDOMChar* theLHS,
692 const XalanDOMChar* theRHS,
693 const XalanDOMChar* theLocale,
709 const XalanDOMChar* theLHS,
710 const XalanDOMChar* theRHS,
715 const XalanDOMChar* theLHS,
716 const XalanDOMChar* theRHS,
717 const XalanDOMChar* theLocale,
722 const CollationCompareFunctor*
723 installCollationCompareFunctor(CollationCompareFunctor* theFunctor);
725 CollationCompareFunctor*
726 uninstallCollationCompareFunctor();
771 uninstallFormatNumberFunctor();
782 createPrintWriter(StreamType& theStream);
785 createPrintWriter(FILE* theStream);
809 getCurrentNode()
const;
812 pushCurrentNode(
XalanNode* theCurrentNode);
826 popContextNodeList();
829 getContextNodeList()
const;
832 getContextNodeListLength()
const;
835 getContextNodeListPosition(
const XalanNode& contextNode)
const;
838 elementAvailable(
const XalanQName& theQName)
const;
846 functionAvailable(
const XalanQName& theQName)
const;
858 const XObjectArgVectorType& argVec,
868 borrowMutableNodeRefList();
876 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
878 createUseAttributeSetIndexesOnStack();
880 virtual UseAttributeSetIndexes&
881 getUseAttributeSetIndexes();
884 popUseAttributeSetIndexesFromStack();
896 createAndPushMutableNodeRefList();
899 releaseAndPopMutableNodeRefList();
911 getNextNodeToTransform();
914 popNodesToTransformList();
917 getAndPushCachedString();
920 getLastCachedString();
923 getAndPopCachedString();
954 getPrefixResolver()
const;
966 getUnparsedEntityURI(
971 shouldStripSourceNode(
const XalanText& node);
1007 m_xsltProcessor(xsltProcessor)
1026 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1030 borrowFormatterToText();
1039 getDecimalFormatSymbols(
const XalanQName& qname);
1041 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1052 ParamsVectorType& params);
1062 isCached(
const XPath* theXPath);
1080 const XPath* theXPath);
1087 cleanUpTransients();
1095 enum { eXPathCacheMax = 50,
1096 eDefaultParamsVectorSize = 10,
1097 eXResultTreeFragAllocatorBlockSize = 10,
1098 eDocumentAllocatorBlockSize = 10,
1099 eDocumentFragmentAllocatorBlockSize = 10,
1100 eDefaultAttributeAllocatorBlockSize = 10,
1101 eDefaultAttributeNSAllocatorBlockSize = 10,
1102 eDefaultCommentAllocatorBlockSize = 10,
1103 eDefaultElementAllocatorBlockSize = 10,
1104 eDefaultElementNSAllocatorBlockSize = 10,
1105 eDefaultPIAllocatorBlockSize = 10,
1106 eDefaultTextAllocatorBlockSize = 20,
1107 eDefaultTextIWSAllocatorBlockSize = 20 };
1109 ElementTemplateElementStackType m_elementRecursionStack;
1113 FormatterListenerVectorType m_formatterListeners;
1115 PrintWriterVectorType m_printWriters;
1117 OutputStreamVectorType m_outputStreams;
1119 CollationCompareFunctor* m_collationCompareFunctor;
1128 ParamsVectorType m_paramsVector;
1130 XPathCacheMapType m_matchPatternCache;
1132 KeyTablesTableType m_keyTables;
1145 CurrentTemplateStackType m_currentTemplateStack;
1159 BooleanStackType m_copyTextNodesOnlyStack;
1160 ModeStackType m_modeStack;
1161 IntStackType m_currentIndexStack;
1163 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1168 FormatterToTextCacheType m_formatterToTextCache;
1170 FormatterToSourceTreeCacheType m_formatterToSourceTreeCache;
1172 NodeSorterCacheType m_nodeSorterCache;
1182 ~FormatterToTextDOMString();
1187 m_printWriter.setString(theString);
1193 FormatterToTextDOMString(
const FormatterToTextDOMString&);
1195 FormatterToTextDOMString&
1196 operator=(
const FormatterToTextDOMString&);
1199 operator==(
const FormatterToTextDOMString&)
const;
1212 MutableNodeRefListStackType;
1218 FormatterToTextStackType;
1220 FormatterToSourceTreeStackType;
1225 class NodesToTransform
1229 m_nodeList(nodeList), m_index(0)
1231 assert(m_nodeList != 0);
1246 if (m_index < m_nodeList->getLength())
1248 return m_nodeList->item(m_index++);
1260 XObjectPtrStackType m_xobjectPtrStack;
1261 MutableNodeRefListStackType m_mutableNodeRefListStack;
1262 NodesToTransformStackType m_nodesToTransformStack;
1263 BooleanStackType m_processCurrentAttributeStack;
1264 BooleanStackType m_executeIfStack;
1265 StringStackType m_stringStack;
1266 FormatterToTextStackType m_formatterToTextStack;
1267 BooleanStackType m_skipElementAttributesStack;
1268 FormatterToSourceTreeStackType m_formatterToSourceTreeStack;
1269 ParamsVectorStackType m_paramsVectorStack;
1270 ElementTemplateElementStackType m_elementInvokerStack;
1271 UseAttributeSetIndexesStackType m_useAttributeSetIndexesStack;
1278 bool m_usePerInstanceDocumentFactory;
1281 eEscapeURLs m_escapeURLs;
1284 eOmitMETATag m_omitMETATag;
1286 bool m_hasStripOrPreserveSpace;
1288 static XalanNumberFormatFactory s_defaultXalanNumberFormatFactory;
1290 static XalanNumberFormatFactory* s_xalanNumberFormatFactory;
1292 static const DefaultCollationCompareFunctor s_defaultCollationFunctor;
1298 XALAN_CPP_NAMESPACE_END
1302 #endif // STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
XObjectFactory & m_xobjectFactory
Definition: XSLTEngineImpl.hpp:1403
const XalanDOMString * getResultPrefixForNamespace(const XalanDOMString &theNamespace) const
Retrieve the result prefix corresponding to a namespace.
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1111
Definition: ElemVariable.hpp:52
Definition: XalanNode.hpp:44
void setXObjectFactory(XObjectFactory *theXObjectFactory)
Set the XObjectFactory instance.
Definition: StylesheetExecutionContextDefault.hpp:187
Definition: XalanText.hpp:38
void startElement(const XalanDOMChar *name, AttributeListType &atts)
Definition: ElemTemplate.hpp:41
Local implementation of MutableNodeRefList.
Definition: MutableNodeRefList.hpp:44
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
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
bool isElementPending() const
Definition: XSLTEngineImpl.hpp:1176
XalanMap< XalanDOMString, XPathCacheEntry > XPathCacheMapType
Definition: StylesheetExecutionContextDefault.hpp:105
XPathCacheReturnFunctor(XSLTEngineImpl &xsltProcessor)
Definition: StylesheetExecutionContextDefault.hpp:1006
VariablesStack::ParamsVectorType ParamsVectorTypeDecl
Definition: StylesheetExecutionContextDefault.hpp:79
void clearTopLevelParams()
Reset the vector of top level parameters.
Definition: XSLTEngineImpl.hpp:1548
bool getQuietConflictWarnings() const
Whether to warn about pattern match conflicts.
Definition: XSLTEngineImpl.hpp:834
Definition: XResultTreeFragAllocator.hpp:39
Definition: Writer.hpp:42
ParamsVectorTypeDecl ParamsVectorType
Definition: StylesheetExecutionContextDefault.hpp:109
This is a table of counters, keyed by ElemNumber objects...
Definition: CountersTable.hpp:160
Definition: ElemTemplateElement.hpp:74
Definition: DOMSupport.hpp:39
virtual void getUniqueNamespaceValue(XalanDOMString &theValue)
Generate a random namespace prefix guaranteed to be unique.
static const XalanDOMString & getXalanXSLNameSpaceURL()
Special Xalan namespace for built-in extensions.
Definition: XSLTEngineImpl.hpp:823
bool getUsePerInstanceDocumentFactory() const
Definition: StylesheetExecutionContextDefault.hpp:207
virtual int operator()(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, eCaseOrder theCaseOrder=eDefault) const =0
StylesheetExecutionContext::ParamVectorType ParamVectorType
Definition: XSLTEngineImpl.hpp:176
virtual void message(const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
Report a message.
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
Definition: StylesheetRoot.hpp:61
NodeType
Definition: XalanNode.hpp:53
Definition: StylesheetExecutionContext.hpp:104
Definition: StylesheetExecutionContextDefault.hpp:729
Definition: XalanSourceTreeDocumentFragmentAllocator.hpp:39
clock_t ClockType
Definition: StylesheetExecutionContextDefault.hpp:96
virtual void resolveTopLevelParams(StylesheetExecutionContext &executionContext)
Resolve the params that were pushed by the caller.
void processingInstruction(const XalanDOMChar *target, const XalanDOMChar *data)
Class to hold XObjectPtr return types.
Definition: XObject.hpp:584
Definition: XalanObjectCache.hpp:435
void cloneToResultTree(const XalanNode &node, bool cloneTextNodesOnly, const LocatorType *locator)
Clone a node to the result tree.
static XalanNumberFormatFactory & getDefaultXalanNumberFormatFactory()
Definition: StylesheetExecutionContextDefault.hpp:633
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
XalanVector< const ElemTemplate * > CurrentTemplateStackType
Definition: StylesheetExecutionContextDefault.hpp:106
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison...
Definition: XSLTEngineImpl.hpp:122
A basic implementation of the class XPathExecutionContext.
Definition: XPathExecutionContextDefault.hpp:65
Definition: StylesheetExecutionContextDefault.hpp:698
Definition: PrintWriter.hpp:35
Definition: XalanObjectStackCache.hpp:46
Definition: XalanCollationServices.hpp:40
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:42
XALAN_STD_QUALIFIER pair< const XPath *, ClockType > XPathCacheEntry
Definition: StylesheetExecutionContextDefault.hpp:104
void setXPathEnvSupport(XPathEnvSupport *theSupport)
Set the XPathEnvSupport instance.
Definition: StylesheetExecutionContextDefault.hpp:165
void pushOutputContext(FormatterListener *theListener)
Definition: XSLTEngineImpl.hpp:1081
void flushPending()
Flush the pending element.
const XalanDOMString * getResultNamespaceForPrefix(const XalanDOMString &prefix) const
Retrieve the result namespace corresponding to a prefix.
FormatNumberFunctor()
Definition: StylesheetExecutionContextDefault.hpp:733
void setXSLTProcessor(XSLTEngineImpl *theProcessor)
Set the DOMSupport instance.
Definition: StylesheetExecutionContextDefault.hpp:201
void copyNamespaceAttributes(const XalanNode &src)
Copy XMLNS: attributes in if not already in scope.
static MemoryManager & getDummyMemMgr()
virtual ~FormatNumberFunctor()
Definition: StylesheetExecutionContextDefault.hpp:736
XalanVector< XalanOutputStream * > OutputStreamVectorType
Definition: StylesheetExecutionContextDefault.hpp:101
Definition: DOMStringPrintWriter.hpp:38
collationCompare(const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
Compare the contents of two character arrays.
Definition: XalanCollationServices.hpp:38
Definition: XPathEnvSupport.hpp:62
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
XalanVector< const ElemTemplateElement * > ElementTemplateElementStackType
Definition: StylesheetExecutionContextDefault.hpp:103
virtual FormatterListener * getFormatterListener() const
Get the current formatter listener.
Definition: XalanSourceTreeDocumentAllocator.hpp:39
void outputToResultTree(const XObject &value, bool outputTextNodesOnly, const LocatorType *locator)
Output an object to the result tree by doing the right conversions.
This class defines an interface for classes that resolve namespace prefixes to their URIs...
Definition: PrefixResolver.hpp:37
Definition: StylesheetExecutionContextDefault.hpp:618
void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
Replace the contents of a pending attribute.
Definition: XSLTEngineImpl.hpp:1165
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
XALAN_STD_QUALIFIER pair< const key_type, data_type > value_type
Definition: XalanMap.hpp:197
void characters(const XalanDOMChar *ch, XalanDOMString::size_type length)
void charactersRaw(const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length)
Receive notification of character data.
eCaseOrder
Definition: XalanCollationServices.hpp:38
Definition: XalanOutputStream.hpp:47
#define XALAN_USES_MEMORY_MANAGER(Type)
Definition: XalanMemoryManagement.hpp:468
unsigned int size_type
Definition: NodeRefListBase.hpp:56
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:25
Definition: StylesheetExecutionContextDefault.hpp:1002
XalanCollationServices::CollationCompareFunctor CollationCompareFunctor
Definition: StylesheetExecutionContextDefault.hpp:696
const XPath * createMatchPattern(const XalanDOMString &str, const PrefixResolver &resolver)
Create and initialize an xpath and return it.
Definition: StylesheetExecutionContextDefault.hpp:86
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
void setDOMSupport(DOMSupport *theDOMSupport)
Set the DOMSupport instance.
Definition: StylesheetExecutionContextDefault.hpp:176
Definition: XPathProcessor.hpp:47
void setUsePerInstanceDocumentFactory(bool fValue)
Definition: StylesheetExecutionContextDefault.hpp:213
virtual void warn(const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
Report a warning.
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
This class takes SAX events (in addition to some extra events that SAX doesn't handle yet) and produc...
Definition: FormatterToText.hpp:47
virtual void error(const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
Report an error and throw an exception.
Definition: XalanSourceTreeDocument.hpp:73
Definition: XResultTreeFrag.hpp:55
virtual void setFormatterListener(FormatterListener *flistener)
Set the current formatter listener.
Defines a class to keep track of a stack for macro arguments.
Definition: VariablesStack.hpp:58
This class can sort vectors of nodes according to a select pattern.
Definition: NodeSorter.hpp:66
unsigned int size_type
Definition: XalanDOMString.hpp:53
void popOutputContext()
Definition: XSLTEngineImpl.hpp:1090
This class handles the creation of XObjects and manages their lifetime.
Definition: XObjectFactory.hpp:51
Stylesheet::KeyTablesTableType KeyTablesTableType
Definition: StylesheetExecutionContextDefault.hpp:108
Class to represent a qualified name: "The name of an internal XSLT object, specifically a named templ...
Definition: XalanQName.hpp:68
bool isPendingResultPrefix(const XalanDOMString &thePrefix) const
Determine whether or not a prefix is in use on the pending element or the pending attributes...
Definition: XalanVector.hpp:61
void endElement(const XalanDOMChar *name)
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
XalanVector< FormatterListener * > FormatterListenerVectorType
Definition: StylesheetExecutionContextDefault.hpp:99
void comment(const XalanDOMChar *data)
Called when a Comment is to be constructed.
void returnXPath(const XPath *xpath)
Return the xpath created by createXPath() or createMatchPattern().
XalanVector< PrintWriter * > PrintWriterVectorType
Definition: StylesheetExecutionContextDefault.hpp:100
virtual void setStylesheetRoot(const StylesheetRoot *theStylesheet)
Set the root stylesheet.