Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


StylesheetExecutionContextDefault.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680)
19 #define STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base class include file.
25 
26 
27 
28 #include <ctime>
29 #include <memory>
30 
31 
32 
38 
39 
41 
42 
43 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
45 #endif
46 
47 
48 
50 
51 
52 
54 
55 
56 
57 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
59 #endif
62 
63 
64 
72 
73 
74 
75 XALAN_CPP_NAMESPACE_BEGIN
76 
77 
78 
80 class XPathProcessor;
81 class XSLTEngineImpl;
82 
85 //
86 // An class which provides support for executing stylesheets.
87 //
89 {
90 public:
91 
92 #if defined(XALAN_STRICT_ANSI_HEADERS)
93  typedef std::clock_t ClockType;
94 #else
95  typedef clock_t ClockType;
96 #endif
97 
101 
103  typedef XALAN_STD_QUALIFIER pair<const XPath*, ClockType> XPathCacheEntry;
106 
109 
110  /**
111  * Construct a StylesheetExecutionContextDefault object
112  *
113  * @param theXPathEnvSupport XPath environment support class instance
114  * @param theDOMSupport DOMSupport class instance
115  * @param theXobjectFactory factory class instance for XObjects
116  * @param theCurrentNode current node in the source tree
117  * @param theContextNodeList node list for current context
118  * @param thePrefixResolver pointer to prefix resolver to use
119  */
121  MemoryManager& theManager,
122  XSLTEngineImpl& xsltProcessor,
123  XPathEnvSupport& theXPathEnvSupport,
124  DOMSupport& theDOMSupport,
125  XObjectFactory& theXObjectFactory,
126  XalanNode* theCurrentNode = 0,
127  const NodeRefListBase* theContextNodeList = 0,
128  const PrefixResolver* thePrefixResolver = 0);
129 
130  /**
131  * Construct a StylesheetExecutionContextDefault object
132  *
133  * @param theXPathEnvSupport XPath environment support class instance
134  * @param theDOMSupport DOMSupport class instance
135  * @param theXobjectFactory factory class instance for XObjects
136  * @param theCurrentNode current node in the source tree
137  * @param theContextNodeList node list for current context
138  * @param thePrefixResolver pointer to prefix resolver to use
139  */
140  explicit
142  MemoryManager& theManager,
143  XalanNode* theCurrentNode = 0,
144  const NodeRefListBase* theContextNodeList = 0,
145  const PrefixResolver* thePrefixResolver = 0);
146 
149  MemoryManager& theManager,
150  XalanNode* theCurrentNode = 0,
151  const NodeRefListBase* theContextNodeList = 0,
152  const PrefixResolver* thePrefixResolver = 0);
153 
154  virtual
156 
157 
158  /**
159  * Set the XPathEnvSupport instance.
160  *
161  * @param theSupport a reference to the instance to use.
162  */
163  void
165  {
166  m_xpathExecutionContextDefault.setXPathEnvSupport(theSupport);
167  }
168 
169  /**
170  * Set the DOMSupport instance.
171  *
172  * @param theDOMSupport a reference to the instance to use.
173  */
174  void
175  setDOMSupport(DOMSupport* theDOMSupport)
176  {
177  m_xpathExecutionContextDefault.setDOMSupport(theDOMSupport);
178  }
179 
180  /**
181  * Set the XObjectFactory instance.
182  *
183  * @param theFactory a reference to the instance to use.
184  */
185  void
186  setXObjectFactory(XObjectFactory* theXObjectFactory)
187  {
188  m_xpathExecutionContextDefault.setXObjectFactory(theXObjectFactory);
189 
190  m_xobjectFactory = theXObjectFactory;
191  }
192 
193 
194  /**
195  * Set the DOMSupport instance.
196  *
197  * @param theDOMSupport a reference to the instance to use.
198  */
199  void
201  {
202  m_xsltProcessor = theProcessor;
203  }
204 
205  bool
207  {
208  return m_usePerInstanceDocumentFactory;
209  }
210 
211  void
213  {
214  m_usePerInstanceDocumentFactory = fValue;
215  }
216 
217 
218  // These interfaces are inherited from StylesheetExecutionContext...
219 
220  virtual bool
222 
223  virtual bool
225 
226  virtual void
227  pushCopyTextNodesOnly(bool copyTextNodesOnly);
228 
229  virtual bool
231 
232 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
233  virtual void
234  pushProcessCurrentAttribute(bool processAttribute);
235 
236  virtual bool
238 
239  virtual void
240  pushSkipElementAttributes(bool skipAttributes);
241 
242  virtual bool
244 
245  virtual bool
247 
248  virtual void
249  pushExecuteIf(bool executeIf);
250 
251  virtual bool
253 #endif
254 
255  virtual XalanNode*
257 
258  virtual void
259  setRootDocument(XalanNode* theDocument);
260 
261  virtual void
262  setStylesheetRoot(const StylesheetRoot* theStylesheet);
263 
264  virtual const XalanQName*
265  getCurrentMode() const;
266 
267  virtual void
268  pushCurrentMode(const XalanQName* theMode);
269 
270  virtual void
272 
273  virtual const ElemTemplate*
275 
276  virtual void
277  pushCurrentTemplate(const ElemTemplate* theTemplate);
278 
279  virtual void
281 
282  virtual bool
284 
285  virtual void
287  const XalanDOMChar* theName,
288  const XalanDOMChar* theNewType,
289  const XalanDOMChar* theNewValue);
290 
291  virtual void
293 
294  virtual void
296 
297  virtual void
299  const XalanDOMString& aname,
300  const XalanDOMString& value);
301 
302  virtual void
304  const XalanDOMString& aname,
305  const XalanDOMChar* value);
306 
307  virtual void
309 
310  virtual const XalanDOMString*
311  getResultPrefixForNamespace(const XalanDOMString& theNamespace) const;
312 
313  virtual const XalanDOMString*
315 
316  virtual bool
318 
319  virtual void
321 
322  virtual FormatterListener*
324 
325  virtual void
327 
328  virtual int
329  getIndent() const;
330 
331  virtual void
332  setIndent(int indentAmount);
333 
334  virtual const XPath*
336  const XalanDOMString& str,
337  const PrefixResolver& resolver);
338 
339  virtual void
340  returnXPath(const XPath* xpath);
341 
342  virtual void
343  pushTopLevelVariables(const ParamVectorType& topLevelParams);
344 
345 
346  virtual const XObjectPtr
348  const XPath& xpath,
349  XalanNode* contextNode,
350  const PrefixResolver& resolver);
351 
352 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
353  virtual const XObjectPtr
354  createVariable(
355  const ElemTemplateElement& templateChild,
356  XalanNode* sourceNode);
357 #endif
358 
359  virtual void
361  const XalanQName& name,
362  const ElemTemplateElement* element,
363  const XalanDOMString& str,
364  XalanNode* contextNode,
365  const PrefixResolver& resolver);
366 
367  virtual void
369  const XalanQName& name,
370  const XObjectPtr val,
371  const ElemTemplateElement* element);
372 
373  virtual void
375  const XalanQName& name,
376  const ElemVariable* var,
377  const ElemTemplateElement* element);
378 
379  virtual void
381  const XalanQName& name,
382  const ElemTemplateElement* element,
383  const XPath& xpath,
384  XalanNode* contextNode,
385  const PrefixResolver& resolver);
386 
387 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
388  virtual void
389  pushVariable(
390  const XalanQName& name,
391  const ElemTemplateElement* element,
392  const ElemTemplateElement& templateChild,
393  XalanNode* sourceNode);
394 #endif
395 
396 
397  virtual void
399 
400  virtual void
402 
403  virtual void
405 
406  virtual void
408 
409 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
410  virtual void beginParams();
411 
412  virtual void endParams();
413 
414  virtual void pushParam(const XalanQName& qName,const XObjectPtr& theValue);
415 #else
416  virtual void
417  pushParams(const ElemTemplateElement& xslCallTemplateElement);
418 #endif
419 
420  virtual const XObjectPtr
421  getParamVariable(const XalanQName& theName);
422 
423  virtual void
425 
426  virtual void
428 
429  virtual int
431 
432  virtual int
434 
435  virtual void
436  pushCurrentStackFrameIndex(int currentStackFrameIndex = -1);
437 
438  virtual void
440 
441  virtual void
443 
444  virtual void
446 
447  virtual void
448  startElement(const XalanDOMChar* name);
449 
450  virtual void
451  endElement(const XalanDOMChar* name);
452 
453  virtual void
455  const XalanDOMChar* ch,
456  fl_size_type start,
458 
459  virtual void
461  const XalanDOMChar* ch,
462  fl_size_type start,
464 
465  virtual void
466  comment(const XalanDOMChar* data);
467 
468  virtual void
470  const XalanDOMChar* target,
471  const XalanDOMChar* data);
472 
473  virtual void
475 
476  virtual void
478  const XalanNode& node,
479  const Locator* locator);
480 
481  virtual void
483  const XalanNode& node,
484  XalanNode::NodeType nodeType,
485  bool overrideStrip,
486  bool shouldCloneAttributes,
487  const Locator* locator);
488 
489 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
490  virtual void
492 
493  virtual const XObjectPtr
495 
496  virtual void
498 
499  virtual void
501 #endif
502 
503 
504 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
505  virtual const XObjectPtr
506  createXResultTreeFrag(
507  const ElemTemplateElement& templateChild,
508  XalanNode* sourceNode);
509 #endif
510 
511  virtual void
513  const XObject& xobj,
514  const Locator* locator);
515 
516  virtual void
518  const XObject& theTree,
519  const Locator* locator);
520 
521  virtual const XalanDOMString&
523 
524  virtual const XalanDOMString&
526 
527  virtual bool
529 
530  virtual void
532 
533  virtual const ElemTemplateElement*
535 
536  virtual bool
538 
539  virtual eEscapeURLs
540  getEscapeURLs() const;
541 
542  virtual void
543  setEscapeURLs(eEscapeURLs value);
544 
545  virtual eOmitMETATag
546  getOmitMETATag() const;
547 
548  void
550 
551  virtual FormatterListener*
553  Writer& writer,
555  bool doIndent = false,
556  int indent = eDefaultXMLIndentAmount,
561  bool xmlDecl = true,
563 
564  virtual FormatterListener*
566  Writer& writer,
571  bool doIndent = true,
572  int indent = eDefaultHTMLIndentAmount,
573  bool escapeURLs = true,
574  bool omitMetaTag = false);
575 
576  virtual FormatterListener*
578  Writer& writer,
579  const XalanDOMString& encoding);
580 
581 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
582  virtual NodeSorter*
584 #else
585  virtual NodeSorter*
586  borrowNodeSorter();
587 
588  virtual bool
589  returnNodeSorter(NodeSorter* theSorter);
590 #endif
591 
594 
595  // A basic class to create XalanNumberFormat instances...
597  {
598  public:
599 
600  explicit
602 
603  virtual
605 
606  virtual XalanNumberFormat*
607  create(MemoryManager& theManager);
608  };
609 
612  {
613  return s_defaultXalanNumberFormatFactory;
614  }
615 
616  /**
617  * Static function to install a new XalanNumberFormatFactory.
618  * The caller owns the XalanNumberFormatFactory instance.
619  *
620  * @param a pointer to the new factory instance to use.
621  * @return a pointer to the old factory instance.
622  */
623  static XalanNumberFormatFactory*
625 
626 
627  virtual tl_size_type
629 
630  virtual void
632 
633  virtual void
635 
636  virtual void
638 
639  virtual bool
641 
642  virtual void
644  const ElemTemplateElement& theStylesheetElement,
645  const NodeRefListBase& nl,
646  const XPath* xpath);
647 
648  virtual int
650  const XalanDOMString& theLHS,
651  const XalanDOMString& theRHS,
653 
654  virtual int
656  const XalanDOMString& theLHS,
657  const XalanDOMString& theRHS,
658  const XalanDOMString& theLocale,
660 
661  virtual int
663  const XalanDOMChar* theLHS,
664  const XalanDOMChar* theRHS,
666 
667  virtual int
669  const XalanDOMChar* theLHS,
670  const XalanDOMChar* theRHS,
671  const XalanDOMChar* theLocale,
673 
675 
677  {
678  public:
679 
681 
682  virtual
684 
685  virtual int
687  const XalanDOMChar* theLHS,
688  const XalanDOMChar* theRHS,
690 
691  virtual int
693  const XalanDOMChar* theLHS,
694  const XalanDOMChar* theRHS,
695  const XalanDOMChar* theLocale,
697  };
698 
699 
702 
705 
706 
708  {
709  public:
710 
712 
713  virtual
715 
716  virtual void
717  operator() (
718  XPathExecutionContext& executionContext,
719  double theNumber,
720  const XalanDOMString& thePattern,
721  const XalanDecimalFormatSymbols* theDFS,
722  XalanDOMString& theResult,
723  const XalanNode* context = 0,
724  const Locator* locator = 0) const = 0;
725  };
726 
727  virtual void
729  double number,
730  const XalanDOMString& pattern,
731  XalanDOMString& theResult,
732  const XalanNode* context = 0,
733  const Locator* locator = 0);
734 
735  virtual void
737  double number,
738  const XalanDOMString& pattern,
739  const XalanDOMString& dfsName,
740  XalanDOMString& theResult,
741  const XalanNode* context = 0,
742  const Locator* locator = 0);
743 
744 
745  const FormatNumberFunctor*
747 
750 
751  virtual PrintWriter*
752  createPrintWriter(XalanOutputStream* theTextOutputStream);
753 
754  virtual PrintWriter*
756  const XalanDOMString& theFileName,
757  const XalanDOMString& theEncoding);
758 
759  virtual PrintWriter*
761 
762  virtual PrintWriter*
763  createPrintWriter(FILE* theStream);
764 
765  virtual CountersTable&
767 
768  virtual void
769  characters(const XalanNode& node);
770 
771  virtual void
772  characters(const XObjectPtr& xobject);
773 
774  virtual void
775  charactersRaw(const XalanNode& node);
776 
777  virtual void
778  charactersRaw(const XObjectPtr& xobject);
779 
780 
781  // These interfaces are inherited from XPathExecutionContext...
782 
783  virtual void
784  reset();
785 
786  virtual XalanNode*
787  getCurrentNode() const;
788 
789  virtual void
790  pushCurrentNode(XalanNode* theCurrentNode);
791 
792  virtual void
794 
795  virtual bool
797  const XalanNode& node1,
798  const XalanNode& node2) const;
799 
800  virtual void
802 
803  virtual void
805 
806  virtual const NodeRefListBase&
808 
809  virtual size_type
811 
812  virtual size_type
813  getContextNodeListPosition(const XalanNode& contextNode) const;
814 
815  virtual bool
816  elementAvailable(const XalanQName& theQName) const;
817 
818  virtual bool
820  const XalanDOMString& theName,
821  const Locator* locator) const;
822 
823  virtual bool
824  functionAvailable(const XalanQName& theQName) const;
825 
826  virtual bool
828  const XalanDOMString& theName,
829  const Locator* locator) const;
830 
831  virtual const XObjectPtr
833  const XalanDOMString& theNamespace,
834  const XalanDOMString& functionName,
835  XalanNode* context,
836  const XObjectArgVectorType& argVec,
837  const Locator* locator);
838 
839  virtual XalanDocument*
841  MemoryManager& theManager,
842  const XalanDOMString& urlString,
843  const XalanDOMString& base,
844  ErrorHandler* theErrorHandler = 0) const;
845 
846  virtual MutableNodeRefList*
848 
849  virtual bool
851 
852  virtual MutableNodeRefList*
853  createMutableNodeRefList(MemoryManager& theManager) const;
854 
855 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
856  virtual void
858 
859  virtual UseAttributeSetIndexes&
861 
862  virtual void
864 
865  virtual void
867 
868  virtual void
870 
871  virtual const ElemTemplateElement*
872  getInvoker() const;
873 
874  virtual MutableNodeRefList&
876 
877  virtual void
879 
880  virtual void
881  pushXObjectPtr(const XObjectPtr& xobjectPtr);
882 
883  virtual void
885 
886  virtual void
888 
889  virtual XalanNode*
891 
892  virtual void
894 
895  virtual XalanDOMString&
897 
898  virtual XalanDOMString&
900 
901  virtual XalanDOMString&
903 #endif
904 
905  virtual XalanDOMString&
907 
908  virtual bool
910 
911 
912  virtual void
914  XalanNode* context,
915  const XalanQName& qname,
916  const XalanDOMString& ref,
917  const Locator* locator,
918  MutableNodeRefList& nodelist);
919 
920  virtual void
922  XalanNode* context,
923  const XalanDOMString& name,
924  const XalanDOMString& ref,
925  const Locator* locator,
926  MutableNodeRefList& nodelist);
927 
928  virtual const XObjectPtr
930  const XalanQName& name,
931  const Locator* locator = 0);
932 
933  virtual const PrefixResolver*
935 
936  virtual void
937  setPrefixResolver(const PrefixResolver* thePrefixResolver);
938 
939  virtual const XalanDOMString*
940  getNamespaceForPrefix(const XalanDOMString& prefix) const;
941 
942  virtual const XalanDOMString&
943  findURIFromDoc(const XalanDocument* owner) const;
944 
945  virtual const XalanDOMString&
947  const XalanDOMString& theName,
948  const XalanDocument& theDocument) const;
949 
950  virtual bool
952 
953  virtual XalanDocument*
954  getSourceDocument(const XalanDOMString& theURI) const;
955 
956  virtual void
958  const XalanDOMString& theURI,
959  XalanDocument* theDocument);
960 
961  // These interfaces are inherited from ExecutionContext...
962  virtual void
964  eSource source,
965  eClassification classification,
966  const XalanDOMString& msg,
967  const Locator* locator,
968  const XalanNode* sourceNode);
969 
970  virtual void
972  eSource source,
973  eClassification classification,
974  const XalanDOMString& msg,
975  const XalanNode* sourceNode);
976 
978  {
979  public:
980 
982  m_xsltProcessor(xsltProcessor)
983  {
984  }
985 
986  void
988 
989  private:
990 
991  XSLTEngineImpl& m_xsltProcessor;
992  };
993 
994  /**
995  * Get a XalanSourceTreeDocument, primarily for creating result
996  * tree fragments.
997  */
999  getSourceTreeFactory(MemoryManager& theManager) const;
1000 
1001 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1002 protected:
1003 
1004  virtual FormatterToText*
1005  borrowFormatterToText();
1006 
1007  virtual bool
1008  returnFormatterToText(FormatterToText* theFormatter);
1009 #endif
1010 
1011 private:
1012 
1014  getDecimalFormatSymbols(const XalanQName& qname);
1015 
1016 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1017  /**
1018  * Given a context, create the params for a template
1019  * call.
1020  *
1021  * @param xslCallTemplateElement "call-template" element
1022  * @param params The params
1023  */
1024  void
1025  getParams(
1026  const ElemTemplateElement& xslCallTemplateElement,
1027  ParamsVectorType& params);
1028 #endif
1029 
1030  /**
1031  * Determine if the XPath is one that we have cached.
1032  *
1033  * @param theXPath the XPath instance to check
1034  * @return true if the instance has been cached, false if not.
1035  */
1036  bool
1037  isCached(const XPath* theXPath);
1038 
1039  /**
1040  * Clear out the cache of XPath instances.
1041  */
1042  void
1043  clearXPathCache();
1044 
1045  /**
1046  * Add an XPath instance to the cache, clearing out an old entry
1047  * if the cache is full.
1048  *
1049  * @param pattern the key for looking up the XPath instance in the cache.
1050  * @param theXPath the XPath instance to cache
1051  */
1052  void
1053  addToXPathCache(
1054  const XalanDOMString& pattern,
1055  const XPath* theXPath);
1056 
1057 
1058  /**
1059  * Clean up anything that was created for use only during the transformation.
1060  */
1061  void
1062  cleanUpTransients();
1063 
1064  XPathExecutionContextDefault m_xpathExecutionContextDefault;
1065 
1066  XSLTEngineImpl* m_xsltProcessor;
1067 
1068  XalanNode* m_rootDocument;
1069 
1070  enum { eXPathCacheMax = 50,
1071  eDefaultParamsVectorSize = 10,
1072  eXResultTreeFragAllocatorBlockSize = 10,
1073  eDocumentAllocatorBlockSize = 10,
1074  eDocumentFragmentAllocatorBlockSize = 10,
1075  eDefaultAttributeAllocatorBlockSize = 10,
1076  eDefaultAttributeNSAllocatorBlockSize = 10,
1077  eDefaultCommentAllocatorBlockSize = 10,
1078  eDefaultElementAllocatorBlockSize = 10,
1079  eDefaultElementNSAllocatorBlockSize = 10,
1080  eDefaultPIAllocatorBlockSize = 10,
1081  eDefaultTextAllocatorBlockSize = 20,
1082  eDefaultTextIWSAllocatorBlockSize = 20 };
1083 
1084  ElementTemplateElementStackType m_elementRecursionStack;
1085 
1086  const StylesheetRoot* m_stylesheetRoot;
1087 
1088  FormatterListenerVectorType m_formatterListeners;
1089 
1090  PrintWriterVectorType m_printWriters;
1091 
1092  OutputStreamVectorType m_outputStreams;
1093 
1094  CollationCompareFunctor* m_collationCompareFunctor;
1095 
1096  FormatNumberFunctor * m_formatNumberFunctor;
1097 
1098  /**
1099  * Holds all information about variables during execution.
1100  */
1101  VariablesStack m_variablesStack;
1102 
1103  ParamsVectorType m_paramsVector;
1104 
1105  XPathCacheMapType m_matchPatternCache;
1106 
1107  KeyTablesTableType m_keyTables;
1108 
1109  CountersTable m_countersTable;
1110 
1111  /**
1112  * The factory that will be used to create result tree fragments based on our
1113  * internal source tree.
1114  */
1115  mutable XalanMemMgrAutoPtr<XalanSourceTreeDocument> m_sourceTreeResultTreeFactory;
1116 
1117  // Holds the current mode.
1118  const XalanQName* m_mode;
1119 
1120  CurrentTemplateStackType m_currentTemplateStack;
1121 
1122  int m_indentAmount;
1123 
1124  XResultTreeFragAllocator m_xresultTreeFragAllocator;
1125 
1126  XalanSourceTreeDocumentFragmentAllocator m_documentFragmentAllocator;
1127 
1128  XalanSourceTreeDocumentAllocator m_documentAllocator;
1129 
1130  typedef XalanVector<bool> BooleanStackType;
1131  typedef XalanVector<const XalanQName*> ModeStackType;
1132  typedef XalanVector<int> IntStackType;
1133 
1134  BooleanStackType m_copyTextNodesOnlyStack;
1135  ModeStackType m_modeStack;
1136  IntStackType m_currentIndexStack;
1137 
1138 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1139  typedef XalanMemoryManagerObjectCacheDefault<FormatterToText> FormatterToTextCacheType;
1140  typedef XalanMemoryManagerObjectCacheDefault<FormatterToSourceTree> FormatterToSourceTreeCacheType;
1141  typedef XalanMemoryManagerObjectCacheDefault<NodeSorter> NodeSorterCacheType;
1142 
1143  FormatterToTextCacheType m_formatterToTextCache;
1144 
1145  FormatterToSourceTreeCacheType m_formatterToSourceTreeCache;
1146 
1147  NodeSorterCacheType m_nodeSorterCache;
1148 #else
1149 
1150  class FormatterToTextDOMString : public FormatterToText
1151  {
1152  public:
1153 
1154  FormatterToTextDOMString(MemoryManager& theManager);
1155 
1156  virtual
1157  ~FormatterToTextDOMString();
1158 
1159  void
1160  setDOMString(XalanDOMString& theString)
1161  {
1162  m_printWriter.setString(theString);
1163  }
1164 
1165  private:
1166 
1167  // These are not defined...
1168  FormatterToTextDOMString(const FormatterToTextDOMString&);
1169 
1170  FormatterToTextDOMString&
1171  operator=(const FormatterToTextDOMString&);
1172 
1173  bool
1174  operator==(const FormatterToTextDOMString&) const;
1175 
1176 
1177  // Data members...
1178  DOMStringPrintWriter m_printWriter;
1179 
1180  static XalanDOMString s_dummyString;
1181  };
1182 
1183  typedef XalanVector<XObjectPtr> XObjectPtrStackType;
1184  typedef XalanVector<ParamsVectorType> ParamsVectorStackType;
1185  typedef XalanVector<UseAttributeSetIndexes> UseAttributeSetIndexesStackType;
1187  MutableNodeRefListStackType;
1188 
1190  StringStackType;
1191 
1193  FormatterToTextStackType;
1195  FormatterToSourceTreeStackType;
1196 
1197  /*
1198  * class to maintain the list of nodes to be transformed by an element
1199  */
1200  class NodesToTransform
1201  {
1202  public:
1203  NodesToTransform(const NodeRefListBase* nodeList) :
1204  m_nodeList(nodeList), m_index(0)
1205  {
1206  assert(m_nodeList != 0);
1207  }
1208 
1209  const NodeRefListBase* operator() ()
1210  {
1211  return m_nodeList;
1212  }
1213 
1215  {
1216  return m_index;
1217  }
1218 
1219  XalanNode* next()
1220  {
1221  if (m_index < m_nodeList->getLength())
1222  {
1223  return m_nodeList->item(m_index++);
1224  }
1225  return 0;
1226  }
1227 
1228  private:
1229  const NodeRefListBase* m_nodeList;
1231  };
1232 
1233  typedef XalanVector<NodesToTransform> NodesToTransformStackType;
1234 
1235  XObjectPtrStackType m_xobjectPtrStack;
1236  MutableNodeRefListStackType m_mutableNodeRefListStack;
1237  NodesToTransformStackType m_nodesToTransformStack;
1238  BooleanStackType m_processCurrentAttributeStack;
1239  BooleanStackType m_executeIfStack;
1240  StringStackType m_stringStack;
1241  FormatterToTextStackType m_formatterToTextStack;
1242  BooleanStackType m_skipElementAttributesStack;
1243  FormatterToSourceTreeStackType m_formatterToSourceTreeStack;
1244  ParamsVectorStackType m_paramsVectorStack;
1245  ElementTemplateElementStackType m_elementInvokerStack;
1246  UseAttributeSetIndexesStackType m_useAttributeSetIndexesStack;
1247 
1248  NodeSorter m_nodeSorter;
1249 #endif
1250 
1251  // If true, we will use a separate document factory for
1252  // result tree fragments.
1253  bool m_usePerInstanceDocumentFactory;
1254 
1255  // Determines whether or not to override the property in the stylesheet.
1256  eEscapeURLs m_escapeURLs;
1257 
1258  // Determines whether or not to override the property in the stylesheet.
1259  eOmitMETATag m_omitMETATag;
1260 
1261  static XalanNumberFormatFactory s_defaultXalanNumberFormatFactory;
1262 
1263  static XalanNumberFormatFactory* s_xalanNumberFormatFactory;
1264 
1265  static const DefaultCollationCompareFunctor s_defaultCollationFunctor;
1266 };
1267 
1268 
1269 
1270 XALAN_CPP_NAMESPACE_END
1271 
1272 
1273 
1274 #endif // STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
StylesheetExecutionContextDefault::uninstallCollationCompareFunctor
CollationCompareFunctor * uninstallCollationCompareFunctor()
StylesheetExecutionContextDefault
Definition: StylesheetExecutionContextDefault.hpp:89
FormatterToSourceTree.hpp
StylesheetExecutionContextDefault::~StylesheetExecutionContextDefault
virtual ~StylesheetExecutionContextDefault()
XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:48
StylesheetExecutionContextDefault::StylesheetExecutionContextDefault
StylesheetExecutionContextDefault(MemoryManager &theManager, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0)
Construct a StylesheetExecutionContextDefault object.
NodeRefListBase::size_type
XalanSize_t size_type
Definition: NodeRefListBase.hpp:53
StylesheetExecutionContextDefault::extFunction
virtual const XObjectPtr extFunction(const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const Locator *locator)
Handle an extension function.
StylesheetExecutionContextDefault::getAndPopCachedString
virtual XalanDOMString & getAndPopCachedString()
Gets the last string to be cached on the stack and pops it from the stack.
StylesheetExecutionContextDefault::createVariable
virtual const XObjectPtr createVariable(const XPath &xpath, XalanNode *contextNode, const PrefixResolver &resolver)
Execute the supplied XPath and and create a variable in the current context.
StylesheetExecutionContextDefault::returnMutableNodeRefList
virtual bool returnMutableNodeRefList(MutableNodeRefList *theList)
Return a previously borrowed MutableNodeRefList instance.
StylesheetExecutionContextDefault::getCopyTextNodesOnly
virtual bool getCopyTextNodesOnly() const
If this function returns true, only text nodes can be copied to the result tree.
XalanCollationServices::eCaseOrder
eCaseOrder
Definition: XalanCollationServices.hpp:40
StylesheetExecutionContextDefault::getNodeSetByKey
virtual void getNodeSetByKey(XalanNode *context, const XalanQName &qname, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist)
Given a valid element key, return the corresponding node list.
StylesheetExecutionContextDefault::getDefaultXalanNumberFormatFactory
static XalanNumberFormatFactory & getDefaultXalanNumberFormatFactory()
Definition: StylesheetExecutionContextDefault.hpp:611
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor::operator()
virtual int operator()(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, const XalanDOMChar *theLocale, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault) const
StylesheetExecutionContextDefault::elementAvailable
virtual bool elementAvailable(const XalanQName &theQName) const
Determine if an external element is available.
StylesheetExecutionContextDefault::popNodesToTransformList
virtual void popNodesToTransformList()
StylesheetExecutionContextDefault::createFormatterToText
virtual FormatterListener * createFormatterToText(Writer &writer, const XalanDOMString &encoding)
FormatterToText instance constructor.
StylesheetExecutionContextDefault::FormatNumberFunctor::~FormatNumberFunctor
virtual ~FormatNumberFunctor()
Definition: StylesheetExecutionContextDefault.hpp:714
XPathExecutionContext::size_type
NodeRefListBase::size_type size_type
Definition: XPathExecutionContext.hpp:85
StylesheetExecutionContextDefault::fireSelectEvent
virtual void fireSelectEvent(const SelectionEvent &se)
Fire a selection event.
StylesheetExecutionContextDefault::setEscapeURLs
virtual void setEscapeURLs(eEscapeURLs value)
StylesheetExecutionContextDefault::findURIFromDoc
virtual const XalanDOMString & findURIFromDoc(const XalanDocument *owner) const
Given a DOM Document, tell what URI was used to parse it.
PrefixResolver
This class defines an interface for classes that resolve namespace prefixes to their URIs.
Definition: PrefixResolver.hpp:40
StylesheetExecutionContextDefault::startDocument
virtual void startDocument()
Receive notification of the beginning of a document.
DOMStringPrintWriter
Definition: DOMStringPrintWriter.hpp:41
StylesheetExecutionContextDefault::functionAvailable
virtual bool functionAvailable(const XalanQName &theQName) const
Determine if a function is available.
StylesheetExecutionContextDefault::getGlobalStackFrameIndex
virtual int getGlobalStackFrameIndex() const
Get the top of the global stack frame.
StylesheetExecutionContextDefault::popCurrentTemplate
virtual void popCurrentTemplate()
XObject
Class to hold XPath return types.
Definition: XObject.hpp:64
StylesheetExecutionContextDefault::pushContextMarker
virtual void pushContextMarker()
Push a context marker onto the stack to let us know when to stop searching for a var.
StylesheetExecutionContextDefault::pushXObjectPtr
virtual void pushXObjectPtr(const XObjectPtr &xobjectPtr)
ProblemListenerBase::eClassification
eClassification
Definition: ProblemListenerBase.hpp:72
length
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:239
StylesheetExecutionContextDefault::setOmitMETATag
void setOmitMETATag(eOmitMETATag value)
Get the value for run-time omission of URLs.
StylesheetExecutionContextDefault::getXSLNameSpaceURL
virtual const XalanDOMString & getXSLNameSpaceURL() const
Determine the full XSLT Namespace URI.
StylesheetExecutionContextDefault::characters
virtual void characters(const XalanDOMChar *ch, fl_size_type start, fl_size_type length)
Receive notification of character data.
XPathExecutionContextDefault
A basic implementation of the class XPathExecutionContext.
Definition: XPathExecutionContextDefault.hpp:65
StylesheetExecutionContextDefault::createFormatterToXML
virtual FormatterListener * createFormatterToXML(Writer &writer, const XalanDOMString &version=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), bool doIndent=false, int indent=eDefaultXMLIndentAmount, const XalanDOMString &encoding=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &mediaType=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypeSystem=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypePublic=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), bool xmlDecl=true, const XalanDOMString &standalone=XalanDOMString(XalanMemMgrs::getDummyMemMgr()))
Create a new FormatterToXML instance.
StylesheetExecutionContextDefault::setIndent
virtual void setIndent(int indentAmount)
Set the current number of spaces to indent.
StylesheetExecutionContextDefault::getIndent
virtual int getIndent() const
Retrieve the current number of spaces to indent.
CountersTable
<meta name="usage" content="internal"> This is a table of counters, keyed by ElemNumber objects,...
Definition: CountersTable.hpp:158
StylesheetExecutionContextDefault::createAndPushMutableNodeRefList
virtual MutableNodeRefList & createAndPushMutableNodeRefList()
StylesheetExecutionContextDefault::PrintWriterVectorType
XalanVector< PrintWriter * > PrintWriterVectorType
Definition: StylesheetExecutionContextDefault.hpp:99
operator==
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)
Definition: ElemAttributeSet.hpp:111
XalanDocument
Definition: XalanDocument.hpp:37
StylesheetExecutionContextDefault::getEscapeURLs
virtual eEscapeURLs getEscapeURLs() const
Get the value for run-time escaping of URLs.
FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:57
StylesheetExecutionContextDefault::FormatterListenerVectorType
XalanVector< FormatterListener * > FormatterListenerVectorType
Definition: StylesheetExecutionContextDefault.hpp:98
NodeSorter
This class can sort vectors of nodes according to a select pattern.
Definition: NodeSorter.hpp:63
TracerEvent
This is the parent class of events generated for tracing the progress of the XSL processor.
Definition: TracerEvent.hpp:50
StylesheetExecutionContextDefault::StylesheetExecutionContextDefault
StylesheetExecutionContextDefault(MemoryManager &theManager, XSLTEngineImpl &xsltProcessor, XPathEnvSupport &theXPathEnvSupport, DOMSupport &theDOMSupport, XObjectFactory &theXObjectFactory, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0)
Construct a StylesheetExecutionContextDefault object.
StylesheetExecutionContextDefault::flushPending
virtual void flushPending()
Flush the pending element.
StylesheetExecutionContextDefault::XPathCacheEntry
XALAN_STD_QUALIFIER pair< const XPath *, ClockType > XPathCacheEntry
Definition: StylesheetExecutionContextDefault.hpp:103
StylesheetExecutionContextDefault::setXPathEnvSupport
void setXPathEnvSupport(XPathEnvSupport *theSupport)
Set the XPathEnvSupport instance.
Definition: StylesheetExecutionContextDefault.hpp:164
StylesheetExecutionContextDefault::reset
virtual void reset()
Reset the instance.
StylesheetExecutionContextDefault::pushVariable
virtual void pushVariable(const XalanQName &name, const ElemVariable *var, const ElemTemplateElement *element)
Push a named variable onto the processor variable stack The variable will be evaluated when first ref...
StylesheetExecutionContextDefault::characters
virtual void characters(const XalanNode &node)
Send character data from a node to the result tree.
StylesheetExecutionContextDefault::endDocument
virtual void endDocument()
Receive notification of the end of a document.
StylesheetExecutionContextDefault::isNodeAfter
virtual bool isNodeAfter(const XalanNode &node1, const XalanNode &node2) const
Determine if a node is after another node, in document order.
StylesheetExecutionContextDefault::pushOnElementRecursionStack
virtual void pushOnElementRecursionStack(const ElemTemplateElement *theElement)
Push an element onto the recursion stack.
StylesheetExecutionContextDefault::clearTopLevelParams
virtual void clearTopLevelParams()
Reset the vector of top level parameters.
StylesheetExecutionContextDefault::createPrintWriter
virtual PrintWriter * createPrintWriter(const XalanDOMString &theFileName, const XalanDOMString &theEncoding)
Create a PrintWriter.
StylesheetExecutionContext::fl_size_type
FormatterListener::size_type fl_size_type
Definition: StylesheetExecutionContext.hpp:114
StylesheetExecutionContextDefault::getTraceSelects
virtual bool getTraceSelects() const
If this is set to true, simple traces of template calls are made.
XalanText
Definition: XalanText.hpp:41
XalanSourceTreeDocument.hpp
XALAN_USES_MEMORY_MANAGER
#define XALAN_USES_MEMORY_MANAGER(Type)
Definition: XalanMemoryManagement.hpp:597
XalanCollationServices::CollationCompareFunctor
Definition: XalanCollationServices.hpp:43
XSLTEngineImpl::m_xobjectFactory
XObjectFactory & m_xobjectFactory
Definition: XSLTEngineImpl.hpp:1401
StylesheetExecutionContextDefault::fireTraceEvent
virtual void fireTraceEvent(const TracerEvent &te)
Fire a trace event.
XResultTreeFragAllocator
Definition: XResultTreeFragAllocator.hpp:42
StylesheetExecutionContextDefault::getResultPrefixForNamespace
virtual const XalanDOMString * getResultPrefixForNamespace(const XalanDOMString &theNamespace) const
Retrieve the result prefix corresponding to a namespace.
StylesheetExecutionContextDefault::popInvoker
virtual void popInvoker()
Pop the element that invoked non children elements.
StylesheetExecutionContextDefault::processingInstruction
virtual void processingInstruction(const XalanDOMChar *target, const XalanDOMChar *data)
Receive notification of a processing instruction.
GenerateEvent
This is the class for events generated by the XSL processor after it generates a new node in the resu...
Definition: GenerateEvent.hpp:53
XALAN_XSLT_EXPORT
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:27
StylesheetExecutionContextDefault::getCurrentTemplate
virtual const ElemTemplate * getCurrentTemplate() const
Retrieve the current template.
XalanNumberFormat
Definition: XalanNumberFormat.hpp:37
StylesheetExecutionContextDefault::getPrefixResolver
virtual const PrefixResolver * getPrefixResolver() const
Retrieve the resolver for namespaces.
XalanSourceTreeDocumentAllocator.hpp
StylesheetExecutionContextDefault::XPathCacheReturnFunctor::XPathCacheReturnFunctor
XPathCacheReturnFunctor(XSLTEngineImpl &xsltProcessor)
Definition: StylesheetExecutionContextDefault.hpp:981
StylesheetExecutionContextDefault::popCurrentNode
virtual void popCurrentNode()
Reset the node currently being executed.
StylesheetExecutionContextDefault::getQuietConflictWarnings
virtual bool getQuietConflictWarnings() const
Determine whether conflicts should be reported.
StylesheetExecutionContextDefault::outputResultTreeFragment
virtual void outputResultTreeFragment(const XObject &theTree, const Locator *locator)
Given a result tree fragment, walk the tree and output it to the result stream.
StylesheetExecutionContextDefault::popCopyTextNodesOnly
virtual bool popCopyTextNodesOnly()
Pop the last flag setting that determines if only text nodes can be copied to the result tree.
StylesheetExecutionContextDefault::setSourceDocument
virtual void setSourceDocument(const XalanDOMString &theURI, XalanDocument *theDocument)
Associate a document with a given URI.
StylesheetExecutionContextDefault::problem
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
Function that is called when a problem event occurs.
StylesheetExecutionContextDefault::collationCompare
virtual int collationCompare(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)
Compare two strings using the collation of the current locale.
XalanObjectStackCache.hpp
StylesheetExecutionContextDefault::getParamVariable
virtual const XObjectPtr getParamVariable(const XalanQName &theName)
Given a name, return a string representing the value, but don't look in the global space.
XalanMemoryManagerObjectCacheDefault
Definition: XalanObjectCache.hpp:443
StylesheetExecutionContextDefault::popOutputContext
virtual void popOutputContext()
StylesheetExecutionContextDefault::cloneToResultTree
virtual void cloneToResultTree(const XalanNode &node, const Locator *locator)
Clone a node to the result tree.
XalanVector.hpp
StylesheetExecutionContextDefault::isElementPending
virtual bool isElementPending() const
See if there is an element pending.
FormatNumberFunctor
XALAN_CPP_NAMESPACE_BEGIN typedef StylesheetExecutionContextDefault::FormatNumberFunctor FormatNumberFunctor
Definition: ICUFormatNumberFunctor.hpp:51
StylesheetExecutionContextDefault::pushVariable
virtual void pushVariable(const XalanQName &name, const ElemTemplateElement *element, const XPath &xpath, XalanNode *contextNode, const PrefixResolver &resolver)
Execute the supplied XPath and push the result as a variable in the current context.
StylesheetExecutionContextDefault::XPathCacheMapType
XalanMap< XalanDOMString, XPathCacheEntry > XPathCacheMapType
Definition: StylesheetExecutionContextDefault.hpp:104
XalanSourceTreeDocumentFragment.hpp
StylesheetExecutionContextDefault::popContextMarker
virtual void popContextMarker()
Pop the current context from the current context stack.
StylesheetExecutionContextDefault::getNodeSetByKey
virtual void getNodeSetByKey(XalanNode *context, const XalanDOMString &name, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist)
Given a valid element key, return the corresponding node list.
StylesheetExecutionContext::eOmitMETATag
eOmitMETATag
Enums to determine whether or not run-time omission of the META tag has been set.
Definition: StylesheetExecutionContext.hpp:1303
StylesheetExecutionContextDefault::XalanNumberFormatFactory
Definition: StylesheetExecutionContextDefault.hpp:597
VariablesStack
Defines a class to keep track of a stack for macro arguments.
Definition: VariablesStack.hpp:61
StylesheetExecutionContextDefault::setRootDocument
virtual void setRootDocument(XalanNode *theDocument)
Set root document for stylesheet.
StylesheetExecutionContextDefault::createFormatterToHTML
virtual FormatterListener * createFormatterToHTML(Writer &writer, const XalanDOMString &encoding=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &mediaType=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypeSystem=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypePublic=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), bool doIndent=true, int indent=eDefaultHTMLIndentAmount, bool escapeURLs=true, bool omitMetaTag=false)
Create a new FormatterToHTML instance.
StylesheetExecutionContextDefault::CurrentTemplateStackType
XalanVector< const ElemTemplate * > CurrentTemplateStackType
Definition: StylesheetExecutionContextDefault.hpp:105
NodeSorter.hpp
StylesheetExecutionContextDefault::popElementRecursionStack
virtual const ElemTemplateElement * popElementRecursionStack()
Pop an element off the recursion stack.
StylesheetExecutionContextDefault::XPathCacheReturnFunctor::operator()
void operator()(const XPathCacheMapType::value_type &theCacheEntry)
StylesheetExecutionContextDefault::replacePendingAttribute
virtual void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
Replace the contents of a pending attribute.
StylesheetExecutionContextDefault::findOnElementRecursionStack
virtual bool findOnElementRecursionStack(const ElemTemplateElement *theElement) const
Determine if an element is on the recursion stack.
StylesheetExecutionContextDefault::beginCreateXResultTreeFrag
virtual void beginCreateXResultTreeFrag(XalanNode *sourceNode)
Initiate creation of a result tree fragment.
StylesheetExecutionContextDefault::getContextNodeListPosition
virtual size_type getContextNodeListPosition(const XalanNode &contextNode) const
StylesheetExecutionContextDefault::popContextNodeList
virtual void popContextNodeList()
Pop the node list for current context.
StylesheetExecutionContextDefault::releaseAndPopMutableNodeRefList
virtual void releaseAndPopMutableNodeRefList()
StylesheetExecutionContextDefault::setXObjectFactory
void setXObjectFactory(XObjectFactory *theXObjectFactory)
Set the XObjectFactory instance.
Definition: StylesheetExecutionContextDefault.hpp:186
StylesheetExecutionContextDefault::createXalanNumberFormat
virtual XalanNumberFormatAutoPtr createXalanNumberFormat()
Create a new XalanNumberFormat instance.
StylesheetExecutionContextDefault::XalanNumberFormatFactory::XalanNumberFormatFactory
XalanNumberFormatFactory()
StylesheetExecutionContextDefault::KeyTablesTableType
Stylesheet::KeyTablesTableType KeyTablesTableType
Definition: StylesheetExecutionContextDefault.hpp:107
StylesheetExecutionContextDefault::shouldStripSourceNode
virtual bool shouldStripSourceNode(const XalanText &node)
Determine if a text node should be stripped from the source tree, as if it weren't there.
XalanOutputStream
Definition: XalanOutputStream.hpp:50
StylesheetExecutionContextDefault::beginParams
virtual void beginParams()
Initiate context to accept a new set of parameters.
DOMStringHelper.hpp
StylesheetExecutionContextDefault::getInvoker
virtual const ElemTemplateElement * getInvoker() const
Get the lastest element that has invoked a non-child element.
XPathProcessor
Definition: XPathProcessor.hpp:54
ProblemListenerBase::eSource
eSource
Definition: ProblemListenerBase.hpp:59
StylesheetExecutionContextDefault::endParams
virtual void endParams()
Indicate parameter set is complete.
XPathExecutionContext
Definition: XPathExecutionContext.hpp:80
XalanMap< XalanDOMString, XPathCacheEntry >
CountersTable.hpp
StylesheetExecutionContextDefault::characters
virtual void characters(const XObjectPtr &xobject)
Send character data from an XObject to the result tree.
StylesheetExecutionContextDefault::getSourceTreeFactory
XalanSourceTreeDocument * getSourceTreeFactory(MemoryManager &theManager) const
Get a XalanSourceTreeDocument, primarily for creating result tree fragments.
StylesheetExecutionContextDefault::ParamsVectorType
ParamsVectorTypeDecl ParamsVectorType
Definition: StylesheetExecutionContextDefault.hpp:108
StylesheetExecutionContextDefault::createPrintWriter
virtual PrintWriter * createPrintWriter(FILE *theStream)
Create a PrintWriter using the provided FILE instance.
StylesheetExecutionContextDefault::fireGenerateEvent
virtual void fireGenerateEvent(const GenerateEvent &ge)
Fire a generate event.
StylesheetExecutionContextDefault::getSourceDocument
virtual XalanDocument * getSourceDocument(const XalanDOMString &theURI) const
Get the document associated with the given URI.
SelectionEvent
Definition: SelectionEvent.hpp:48
StylesheetExecutionContextDefault::pushElementFrame
virtual void pushElementFrame(const ElemTemplateElement *elem)
Push a frame marker for an element.
StylesheetExecutionContextDefault::formatNumber
virtual void formatNumber(double number, const XalanDOMString &pattern, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)
Formats a number according to the specified pattern.
StylesheetExecutionContextDefault::FormatNumberFunctor
Definition: StylesheetExecutionContextDefault.hpp:708
DOMSupport
Definition: DOMSupport.hpp:42
StylesheetExecutionContextDefault::XalanNumberFormatFactory::~XalanNumberFormatFactory
virtual ~XalanNumberFormatFactory()
StylesheetExecutionContextDefault::traceSelect
virtual void traceSelect(const ElemTemplateElement &theStylesheetElement, const NodeRefListBase &nl, const XPath *xpath)
Compose a diagnostic trace of the current selection.
XalanObjectStackCache
Definition: XalanObjectStackCache.hpp:49
StylesheetExecutionContextDefault::getNodeSorter
virtual NodeSorter * getNodeSorter()
Get node sorter instance.
StylesheetExecutionContextDefault::installXalanNumberFormatFactory
static XalanNumberFormatFactory * installXalanNumberFormatFactory(XalanNumberFormatFactory *theFactory)
Static function to install a new XalanNumberFormatFactory.
XalanSourceTreeDocumentFragmentAllocator.hpp
StylesheetExecutionContextDefault::pushContextNodeList
virtual void pushContextNodeList(const NodeRefListBase &theList)
Push the node list for current context.
StylesheetExecutionContextDefault::popUseAttributeSetIndexesFromStack
virtual void popUseAttributeSetIndexesFromStack()
StylesheetExecutionContextDefault::comment
virtual void comment(const XalanDOMChar *data)
Called when a Comment is to be constructed.
StylesheetExecutionContextDefault::FormatNumberFunctor::FormatNumberFunctor
FormatNumberFunctor()
Definition: StylesheetExecutionContextDefault.hpp:711
StylesheetExecutionContextDefault::createMatchPattern
virtual const XPath * createMatchPattern(const XalanDOMString &str, const PrefixResolver &resolver)
Create and initialize an xpath and return it.
StylesheetExecutionContextDefault::endElement
virtual void endElement(const XalanDOMChar *name)
Receive notification of the end of an element.
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor::~DefaultCollationCompareFunctor
virtual ~DefaultCollationCompareFunctor()
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor
Definition: StylesheetExecutionContextDefault.hpp:677
XObjectFactory
This class handles the creation of XObjects and manages their lifetime.
Definition: XObjectFactory.hpp:54
XalanSourceTreeDocument
Definition: XalanSourceTreeDocument.hpp:76
StylesheetExecutionContextDefault::uninstallFormatNumberFunctor
FormatNumberFunctor * uninstallFormatNumberFunctor()
StylesheetExecutionContextDefault::pushCurrentStackFrameIndex
virtual void pushCurrentStackFrameIndex(int currentStackFrameIndex=-1)
Set the top of the stack frame from where a search for a variable or param should take place.
StylesheetExecutionContextDefault::endFormatToText
virtual void endFormatToText()
Indicates the completion of the result string.
StylesheetExecutionContextDefault::pushCurrentNode
virtual void pushCurrentNode(XalanNode *theCurrentNode)
Change the node currently being executed.
StylesheetExecutionContextDefault::ElementTemplateElementStackType
XalanVector< const ElemTemplateElement * > ElementTemplateElementStackType
Definition: StylesheetExecutionContextDefault.hpp:102
StylesheetExecutionContextDefault::setFormatterListener
virtual void setFormatterListener(FormatterListener *flistener)
Set the current formatter listener.
VariablesStack.hpp
StylesheetExecutionContextDefault::popCurrentStackFrameIndex
virtual void popCurrentStackFrameIndex()
Pop the last stack frame index setting.
StylesheetExecutionContextDefault::pushParam
virtual void pushParam(const XalanQName &qName, const XObjectPtr &theValue)
Push a single paramter onto the latest initialized paramter set.
StylesheetExecutionContextDefault::isPendingResultPrefix
virtual bool isPendingResultPrefix(const XalanDOMString &thePrefix)
Determine whether or not a prefix is in use on the pending element or the pending attributes.
StylesheetExecutionContextDefault::getCurrentNode
virtual XalanNode * getCurrentNode() const
Retrieve the node currently being executed.
StylesheetExecutionContextDefault::charactersRaw
virtual void charactersRaw(const XalanDOMChar *ch, fl_size_type start, fl_size_type length)
Receive notification of character data.
StylesheetExecutionContextDefault::addResultAttribute
virtual void addResultAttribute(const XalanDOMString &aname, const XalanDOMString &value)
Add a result attribute to the list of pending attributes.
StylesheetExecutionContextDefault::getFormatterListener
virtual FormatterListener * getFormatterListener() const
Get the current formatter listener.
StylesheetExecutionContextDefault::pushCurrentMode
virtual void pushCurrentMode(const XalanQName *theMode)
Set the current mode.
StylesheetExecutionContextDefault::installFormatNumberFunctor
const FormatNumberFunctor * installFormatNumberFunctor(FormatNumberFunctor *formatNumberFunctor)
StylesheetExecutionContextDefault::pushExecuteIf
virtual void pushExecuteIf(bool executeIf)
Set flag that determines if the if test was true.
StylesheetExecutionContextDefault::startElement
virtual void startElement(const XalanDOMChar *name)
Receive notification of the beginning of an element.
StylesheetExecutionContextDefault::collationCompare
virtual int collationCompare(const XalanDOMString &theLHS, const XalanDOMString &theRHS, const XalanDOMString &theLocale, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)
Compare two strings using the collation of the supplied locale.
StylesheetExecutionContextDefault::getOmitMETATag
virtual eOmitMETATag getOmitMETATag() const
Get the value for run-time omission of URLs.
XPathEnvSupport
Definition: XPathEnvSupport.hpp:58
StylesheetExecutionContextDefault::createPrintWriter
virtual PrintWriter * createPrintWriter(XalanOutputStream *theTextOutputStream)
Create a PrintWriter for the provided stream.
StylesheetExecutionContextDefault::setPrefixResolver
virtual void setPrefixResolver(const PrefixResolver *thePrefixResolver)
Change the resolver for namespaces.
XalanVector
Definition: XalanVector.hpp:59
XalanDOMString
Definition: XalanDOMString.hpp:46
StylesheetExecutionContextDefault::popExecuteIf
virtual bool popExecuteIf()
Pop the flag that determines if the if test was true.
XalanObjectCache.hpp
StylesheetExecutionContextDefault::getCurrentMode
virtual const XalanQName * getCurrentMode() const
Retrieve the current mode.
StylesheetExecutionContextDefault::getVariable
virtual const XObjectPtr getVariable(const XalanQName &name, const Locator *locator=0)
Given a name, locate a variable in the current context, and return a pointer to the object.
StylesheetExecutionContext::tl_size_type
XalanSize_t tl_size_type
Definition: StylesheetExecutionContext.hpp:112
StylesheetExecutionContextDefault::getNamespaceForPrefix
virtual const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix) const
Retrieve the URI corresponding to a namespace prefix.
XPath
Definition: XPath.hpp:65
StylesheetExecutionContextDefault::XalanNumberFormatFactory::create
virtual XalanNumberFormat * create(MemoryManager &theManager)
StylesheetExecutionContextDefault::getRootDocument
virtual XalanNode * getRootDocument() const
Retrieve root document for stylesheet.
StylesheetExecutionContextDefault::popXObjectPtr
virtual void popXObjectPtr()
XalanMemMgrs::getDummyMemMgr
static MemoryManager & getDummyMemMgr()
ElemTemplateElement
Definition: ElemTemplateElement.hpp:77
XalanMemMgrAutoPtr
Definition: XalanMemMgrAutoPtr.hpp:47
StylesheetExecutionContextDefault::popProcessCurrentAttribute
virtual bool popProcessCurrentAttribute()
Pops the last flag setting that determines if the current attribute should be executed.
XalanDecimalFormatSymbols
Definition: XalanDecimalFormatSymbols.hpp:41
StylesheetExecutionContextDefault::setUsePerInstanceDocumentFactory
void setUsePerInstanceDocumentFactory(bool fValue)
Definition: StylesheetExecutionContextDefault.hpp:212
StylesheetExecutionContextDefault::installCollationCompareFunctor
const CollationCompareFunctor * installCollationCompareFunctor(CollationCompareFunctor *theFunctor)
XObjectPtr
Class to hold XObjectPtr return types.
Definition: XObject.hpp:884
StylesheetExecutionContextDefault::borrowMutableNodeRefList
virtual MutableNodeRefList * borrowMutableNodeRefList()
Borrow a cached MutableNodeRefList instance.
StylesheetExecutionContextDefault::pushVariable
virtual void pushVariable(const XalanQName &name, const ElemTemplateElement *element, const XalanDOMString &str, XalanNode *contextNode, const PrefixResolver &resolver)
Execute an XPath using the provided expression, and push the result as a variable in the context of t...
NodeRefListBase
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:45
StylesheetExecutionContextDefault::getXalanXSLNameSpaceURL
virtual const XalanDOMString & getXalanXSLNameSpaceURL() const
Special Xalan namespace for built-in extensions.
StylesheetExecutionContextDefault::createPrintWriter
virtual PrintWriter * createPrintWriter(StreamType &theStream)
Create a PrintWriter using the provided ostream instance.
XalanCollationServices::eDefault
@ eDefault
Definition: XalanCollationServices.hpp:40
StylesheetExecutionContextDefault::releaseCachedString
virtual bool releaseCachedString(XalanDOMString &theString)
Return a cached string.
StylesheetExecutionContextDefault::CollationCompareFunctor
XalanCollationServices::CollationCompareFunctor CollationCompareFunctor
Definition: StylesheetExecutionContextDefault.hpp:674
StylesheetExecutionContextDefault::getAndPushCachedString
virtual XalanDOMString & getAndPushCachedString()
Get a string that is cached on a stack.
ElemTemplate
Definition: ElemTemplate.hpp:44
StylesheetExecutionContextDefault::addResultAttribute
virtual void addResultAttribute(const XalanDOMString &aname, const XalanDOMChar *value)
Add a result attribute to the list of pending attributes.
StylesheetExecutionContextDefault::getCachedString
virtual XalanDOMString & getCachedString()
Get a cached string for temporary use.
StylesheetExecutionContextDefault::pushVariable
virtual void pushVariable(const XalanQName &name, const XObjectPtr val, const ElemTemplateElement *element)
Push a named variable onto the variables stack.
StylesheetExecutionContextDefault::setStylesheetRoot
virtual void setStylesheetRoot(const StylesheetRoot *theStylesheet)
Set root stylesheet for stylesheet.
StylesheetExecutionContextDefault::beginFormatToText
virtual void beginFormatToText(XalanDOMString &theResult)
Initiate to put execution result in string.
StylesheetExecutionContextDefault::createUseAttributeSetIndexesOnStack
virtual void createUseAttributeSetIndexesOnStack()
FormatterToText
This class takes SAX events (in addition to some extra events that SAX doesn't handle yet) and produc...
Definition: FormatterToText.hpp:50
StylesheetExecutionContextDefault::pushSkipElementAttributes
virtual void pushSkipElementAttributes(bool skipAttributes)
Set the flag that determines if an element's attributes should be skipped.
StylesheetExecutionContextDefault::endCreateXResultTreeFrag
virtual const XObjectPtr endCreateXResultTreeFrag()
Indicate sthe completion of result tree fragment.
StylesheetExecutionContextDefault::collationCompare
virtual int collationCompare(const XalanDOMString &theLHS, const XalanDOMString &theRHS, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)
Compare two strings using the collation of the current locale.
StylesheetExecutionContextDefault::returnXResultTreeFrag
virtual bool returnXResultTreeFrag(XResultTreeFrag *theXResultTreeFrag)
This is a hook that XResultTreeFrag instances (which are reference counted), can notify the owning St...
XalanQName
Class to represent a qualified name.
Definition: XalanQName.hpp:71
XalanMap.hpp
FormatterToText.hpp
StylesheetExecutionContextDefault::resolveTopLevelParams
virtual void resolveTopLevelParams()
Resolve the params that were pushed by the caller.
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor::DefaultCollationCompareFunctor
DefaultCollationCompareFunctor()
StylesheetExecutionContextDefault::setDOMSupport
void setDOMSupport(DOMSupport *theDOMSupport)
Set the DOMSupport instance.
Definition: StylesheetExecutionContextDefault.hpp:175
StylesheetExecutionContextDefault::getSkipElementAttributes
virtual bool getSkipElementAttributes() const
Get the last flag setting that determines if an element's attributes should be skipped.
StylesheetExecutionContextDefault::getTraceListeners
virtual tl_size_type getTraceListeners() const
Determine the number of trace listeners.
StylesheetRoot
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
Definition: StylesheetRoot.hpp:64
StylesheetExecutionContextDefault::cloneToResultTree
virtual void cloneToResultTree(const XalanNode &node, XalanNode::NodeType nodeType, bool overrideStrip, bool shouldCloneAttributes, const Locator *locator)
Clone a node to the result tree.
StylesheetExecutionContextDefault::charactersRaw
virtual void charactersRaw(const XalanNode &node)
Send raw character data from a node to the result tree.
StylesheetExecutionContextDefault::getUnparsedEntityURI
virtual const XalanDOMString & getUnparsedEntityURI(const XalanDOMString &theName, const XalanDocument &theDocument) const
The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in t...
StylesheetExecutionContextDefault::createAndPushNodesToTransformList
virtual void createAndPushNodesToTransformList(const NodeRefListBase *nodeList)
ElemVariable
Definition: ElemVariable.hpp:48
StylesheetExecutionContext::StreamType
std::ostream StreamType
Definition: StylesheetExecutionContext.hpp:119
XResultTreeFrag
Definition: XResultTreeFrag.hpp:51
StylesheetExecutionContext
Definition: StylesheetExecutionContext.hpp:109
XalanMap< XalanDOMString, XPathCacheEntry >::value_type
XALAN_STD_QUALIFIER pair< const key_type, data_type > value_type
Definition: XalanMap.hpp:201
StylesheetExecutionContextDefault::ClockType
clock_t ClockType
Definition: StylesheetExecutionContextDefault.hpp:95
StylesheetExecutionContextDefault::pushCurrentTemplate
virtual void pushCurrentTemplate(const ElemTemplate *theTemplate)
Set the current template.
StylesheetExecutionContextDefault::pushOutputContext
virtual void pushOutputContext(FormatterListener *flistener=0)
StylesheetExecutionContextDefault::charactersRaw
virtual void charactersRaw(const XObjectPtr &xobject)
Send raw character data from an XObject to the result tree.
StylesheetExecutionContextDefault::parseXML
virtual XalanDocument * parseXML(MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0) const
Provides support for XML parsing service.
StylesheetExecutionContextDefault::popCurrentMode
virtual void popCurrentMode()
Pop the current mode.
StylesheetExecutionContextDefault::getUniqueNamespaceValue
virtual void getUniqueNamespaceValue(XalanDOMString &theValue) const
Generate a random namespace prefix guaranteed to be unique.
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor::operator()
virtual int operator()(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault) const
StylesheetExecutionContextDefault::returnXPath
virtual void returnXPath(const XPath *xpath)
Return the XPath created by createMatchPattern().
StylesheetExecutionContextDefault::getContextNodeList
virtual const NodeRefListBase & getContextNodeList() const
Get the node list for current context.
Writer
Definition: Writer.hpp:45
StylesheetExecutionContextDefault::XPathCacheReturnFunctor
Definition: StylesheetExecutionContextDefault.hpp:978
XalanSourceTreeDocumentAllocator
Definition: XalanSourceTreeDocumentAllocator.hpp:42
XalanNode
Definition: XalanNode.hpp:39
StylesheetExecutionContextDefault::popElementFrame
virtual void popElementFrame()
Pop a frame marker for an element.
MutableNodeRefList
Local implementation of MutableNodeRefList.
Definition: MutableNodeRefList.hpp:47
StylesheetExecutionContextDefault::pushTopLevelVariables
virtual void pushTopLevelVariables(const ParamVectorType &topLevelParams)
Set a list of top level variables in the specified execution context stylesheet.
StylesheetExecutionContextDefault::pushInvoker
virtual void pushInvoker(const ElemTemplateElement *invoker)
Push the element that will invoke non children elements (i.e templates, attribute-sets)
XalanSourceTreeDocumentFragmentAllocator
Definition: XalanSourceTreeDocumentFragmentAllocator.hpp:42
ParamsVectorTypeDecl
VariablesStack::ParamsVectorType ParamsVectorTypeDecl
Definition: StylesheetExecutionContextDefault.hpp:81
XPathExecutionContextDefault.hpp
StylesheetExecutionContextDefault::collationCompare
virtual int collationCompare(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, const XalanDOMChar *theLocale, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)
Compare two strings using the collation of the current locale.
StylesheetExecutionContextDefault::setXSLTProcessor
void setXSLTProcessor(XSLTEngineImpl *theProcessor)
Set the DOMSupport instance.
Definition: StylesheetExecutionContextDefault.hpp:200
StylesheetExecutionContextDefault::getNextNodeToTransform
virtual XalanNode * getNextNodeToTransform()
StylesheetExecutionContextDefault::getUsePerInstanceDocumentFactory
bool getUsePerInstanceDocumentFactory() const
Definition: StylesheetExecutionContextDefault.hpp:206
StylesheetExecutionContextDefault::pushProcessCurrentAttribute
virtual void pushProcessCurrentAttribute(bool processAttribute)
Set the flag that determines if the current attribute should be executed.
StylesheetExecutionContext.hpp
PrintWriter
Definition: PrintWriter.hpp:38
StylesheetExecutionContextDefault::getContextNodeListLength
virtual size_type getContextNodeListLength() const
StylesheetExecutionContextDefault::OutputStreamVectorType
XalanVector< XalanOutputStream * > OutputStreamVectorType
Definition: StylesheetExecutionContextDefault.hpp:100
StylesheetExecutionContextDefault::getLastCachedString
virtual XalanDOMString & getLastCachedString()
Gets the last string that was cached on the stack.
XSLTEngineImpl
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison,...
Definition: XSLTEngineImpl.hpp:129
StylesheetExecutionContextDefault::functionAvailable
virtual bool functionAvailable(const XalanDOMString &theName, const Locator *locator) const
Determine if a function is available.
StylesheetExecutionContextDefault::outputToResultTree
virtual void outputToResultTree(const XObject &xobj, const Locator *locator)
Output an object to the result tree by doing the right conversions.
StylesheetExecutionContextDefault::popSkipElementAttributes
virtual bool popSkipElementAttributes()
Pops the last flag setting that determines if an element's attributes should be skipped.
XResultTreeFragAllocator.hpp
StylesheetExecutionContextDefault::elementAvailable
virtual bool elementAvailable(const XalanDOMString &theName, const Locator *locator) const
Determine if an external element is available by resolving a string to a QName.
StylesheetExecutionContextDefault::formatNumber
virtual void formatNumber(double number, const XalanDOMString &pattern, const XalanDOMString &dfsName, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)
Formats a number according to the specified pattern.
StylesheetExecutionContextDefault::copyNamespaceAttributes
virtual void copyNamespaceAttributes(const XalanNode &src)
Add namespace attributes for a node to the list of pending attributes.
StylesheetExecutionContext::UseAttributeSetIndexes
Definition: StylesheetExecutionContext.hpp:1544
StylesheetExecutionContextDefault::pushCopyTextNodesOnly
virtual void pushCopyTextNodesOnly(bool copyTextNodesOnly)
Set the flag that determines if only text nodes can be copied to the result tree.
StylesheetExecutionContextDefault::getResultNamespaceForPrefix
virtual const XalanDOMString * getResultNamespaceForPrefix(const XalanDOMString &thePrefix) const
Retrieve the result namespace corresponding to a prefix.
StylesheetExecutionContextDefault::create
static StylesheetExecutionContextDefault * create(MemoryManager &theManager, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0)
Stylesheet.hpp
StylesheetExecutionContextDefault::getCountersTable
virtual CountersTable & getCountersTable()
Get the counters table, which is a table of cached results that is used by ElemNumber.
DOMStringPrintWriter.hpp
StylesheetExecutionContextDefault::getCurrentStackFrameIndex
virtual int getCurrentStackFrameIndex() const
Get the top of the stack frame from where a search for a variable or param should take place.
XalanSet.hpp
StylesheetExecutionContextDefault::problem
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
Function that is called when a problem event occurs.
StylesheetExecutionContextDefault::getUseAttributeSetIndexes
virtual UseAttributeSetIndexes & getUseAttributeSetIndexes()
StylesheetExecutionContextDefault::createMutableNodeRefList
virtual MutableNodeRefList * createMutableNodeRefList(MemoryManager &theManager) const
Create a MutableNodeRefList with the appropriate 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.

Apache Logo