Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


StylesheetExecutionContext.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(STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680)
19 #define STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 #include <cstddef>
29 #include <cstdio>
30 #include <memory>
31 
32 
33 
34 // Base class header file...
36 
37 
38 
39 
41 
42 
43 
44 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
46 #endif
47 
48 
49 
51 
52 
53 
54 
58 
59 
60 
62 
63 
64 
65 XALAN_CPP_NAMESPACE_BEGIN
66 
67 
68 
69 #if defined(XALAN_STRICT_ANSI_HEADERS)
70 using std::FILE;
71 #endif
72 
73 
74 
75 class CountersTable;
76 class ElemTemplate;
78 class ElemVariable;
79 class FormatterListener;
80 class FormatterToText;
81 class GenerateEvent;
82 class PrefixResolver;
83 class NodeRefListBase;
84 class NodeSorter;
85 class PrintWriter;
86 class XalanQName;
87 class SelectionEvent;
88 class Stylesheet;
89 class StylesheetRoot;
90 class XalanOutputStream;
91 class TracerEvent;
92 class Writer;
93 class XalanDocument;
95 class XalanElement;
96 class XalanNode;
97 class XalanNumberFormat;
98 class XPath;
99 class XObject;
100 class XObjectPtr;
101 class XResultTreeFrag;
102 
103 
104 
105 //
106 // An abstract class which provides support for executing stylesheets.
107 //
109 {
110 public:
111 
112  typedef XalanSize_t tl_size_type;
113 
115 
116 #if defined(XALAN_NO_STD_NAMESPACE)
117  typedef ostream StreamType;
118 #else
119  typedef std::ostream StreamType;
120 #endif
121 
122  explicit
124  MemoryManager& theMemoryManager,
125  XObjectFactory* theXObjectFactory = 0);
126 
127  virtual
129 
130  // These interfaces are new...
131 
132  /**
133  * Determine whether conflicts should be reported.
134  *
135  * @return true if conflicts should not be warned
136  */
137  virtual bool
139 
140  /**
141  * If this function returns true, only text nodes can
142  * be copied to the result tree.
143  *
144  * @return true or false
145  */
146  virtual bool
147  getCopyTextNodesOnly() const = 0;
148 
149  /**
150  * Set the flag that determines if only text nodes
151  * can be copied to the result tree.
152  *
153  * @param copyTextNodesOnly The value of the flag
154  */
155  virtual void
156  pushCopyTextNodesOnly(bool copyTextNodesOnly) = 0;
157 
158  /**
159  * Pop the last flag setting that determines if only text nodes
160  * can be copied to the result tree.
161  */
162  virtual bool
164 
165  /*
166  * A class to manage setting and restoring the flag
167  * for restricting copying only text nodes to the
168  * result tree
169  */
171  {
172  public:
173 
175  StylesheetExecutionContext& executionContext,
176  bool fValue) :
177  m_executionContext(executionContext)
178  {
179  executionContext.pushCopyTextNodesOnly(fValue);
180  }
181 
183  {
184  m_executionContext.popCopyTextNodesOnly();
185  }
186 
187  private:
188 
189  // Not implemented...
191 
193  operator=(const SetAndRestoreCopyTextNodesOnly&);
194 
195  // Data members...
196  StylesheetExecutionContext& m_executionContext;
197 
198  };
199 
200 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
201  /**
202  * Set the flag that determines if the current attribute should be executed
203  * @param processAttribute the value of the flag
204  */
205  virtual void
206  pushProcessCurrentAttribute(bool processAttribute) = 0;
207 
208  /**
209  * Pops the last flag setting that determines if the current attribute should be executed
210  */
211  virtual bool
213 
214  /**
215  * Set the flag that determines if an element's attributes should be skipped
216  *
217  * @param skipAttributes the value of the flag
218  */
219  virtual void
220  pushSkipElementAttributes(bool skipAttributes) = 0;
221 
222  /**
223  * Get the last flag setting that determines if an element's attributes should be skipped
224  * @returns the value of the flag
225  */
226  virtual bool
228 
229  /**
230  * Pops the last flag setting that determines if an element's attributes should be skipped
231  */
232  virtual bool
234 
235  /**
236  * Set flag that determines if the if test was true
237  *
238  * @param executeIf the value of the flag
239  */
240  virtual void
241  pushExecuteIf(bool executeIf) = 0;
242 
243  /**
244  * Pop the flag that determines if the if test was true
245  *
246  * @param executeIf the value of the flag
247  */
248  virtual bool
250 #endif
251 
252  /**
253  * Retrieve root document for stylesheet. Note that
254  * this does not have to be a XalanDocument -- it can
255  * be any node in a document.
256  *
257  * @return root document
258  */
259  virtual XalanNode*
260  getRootDocument() const = 0;
261 
262  /**
263  * Set root document for stylesheet. Note that
264  * this does not have to be a XalanDocument -- it can
265  * be any node in a document.
266  *
267  * @param theDocument root document
268  */
269  virtual void
270  setRootDocument(XalanNode* theDocument) = 0;
271 
272  /**
273  * Set root stylesheet for stylesheet.
274  *
275  * @param theStylesheet root stylesheet
276  */
277  virtual void
278  setStylesheetRoot(const StylesheetRoot* theStylesheet) = 0;
279 
280  /**
281  * Retrieve the current mode.
282  *
283  * @return QName for mode
284  */
285  virtual const XalanQName*
286  getCurrentMode() const = 0;
287 
288  /**
289  * Set the current mode.
290  *
291  * @param theMode QName for mode
292  */
293  virtual void
294  pushCurrentMode(const XalanQName* theMode) = 0;
295 
296 
297  /**
298  * Pop the current mode
299  */
300  virtual void
302 
303  /**
304  * Retrieve the current template
305  *
306  * @return The current template instance or null if there is no current template
307  */
308  virtual const ElemTemplate*
309  getCurrentTemplate() const = 0;
310 
311  /**
312  * Set the current template
313  *
314  * @param theTemplate The current template instance
315  */
316  virtual void
317  pushCurrentTemplate(const ElemTemplate* theTemplate) = 0;
318 
319  virtual void
321 
322 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
323  /*
324  * A class to manage pushing and popping the current
325  * template instance.
326  */
327  class PushAndPopCurrentTemplate
328  {
329  public:
330 
331  PushAndPopCurrentTemplate(
332  StylesheetExecutionContext& executionContext,
333  const ElemTemplate* theTemplate) :
334  m_executionContext(executionContext)
335  {
336  executionContext.pushCurrentTemplate(theTemplate);
337  }
338 
339  ~PushAndPopCurrentTemplate()
340  {
341  m_executionContext.popCurrentTemplate();
342  }
343 
344  private:
345 
346  // Data members...
347  StylesheetExecutionContext& m_executionContext;
348  };
349 #endif
350 
351  /**
352  * See if there is an element pending.
353  */
354  virtual bool
355  isElementPending() const = 0;
356 
357  /**
358  * Replace the contents of a pending attribute.
359  *
360  * @param theName name of attribute
361  * @param theNewType type of attribute
362  * @param theNewValue new value of attribute
363  */
364  virtual void
366  const XalanDOMChar* theName,
367  const XalanDOMChar* theNewType,
368  const XalanDOMChar* theNewValue) = 0;
369 
370  /**
371  * Get the current formatter listener.
372  *
373  * @return pointer to formatter listener
374  */
375  virtual FormatterListener*
376  getFormatterListener() const = 0;
377 
378  /**
379  * Set the current formatter listener.
380  *
381  * @param flistener pointer to new formatter listener
382  */
383  virtual void
385 
386  virtual void
388 
389  virtual void
391 
393  {
394  public:
395 
396  /**
397  * Construct an object to push and pop the current output context.
398  *
399  * @param theExecutionContext a reference to the current execution context
400  * @param theNewListener the new FormatterListener to set.
401  */
403  StylesheetExecutionContext& theExecutionContext,
404  FormatterListener* theNewListener = 0) :
405  m_executionContext(theExecutionContext)
406  {
407  m_executionContext.pushOutputContext(theNewListener);
408  }
409 
411  {
412  m_executionContext.popOutputContext();
413  }
414 
415  private:
416 
417  StylesheetExecutionContext& m_executionContext;
418  };
419 
420  /**
421  * Add a result attribute to the list of pending attributes.
422  *
423  * @param aname name of attribute
424  * @param value value of attribute
425  */
426  virtual void
428  const XalanDOMString& aname,
429  const XalanDOMString& value) = 0;
430 
431  /**
432  * Add a result attribute to the list of pending attributes.
433  *
434  * @param aname name of attribute
435  * @param value value of attribute
436  */
437  virtual void
439  const XalanDOMString& aname,
440  const XalanDOMChar* value) = 0;
441 
442  /**
443  * Add namespace attributes for a node to the list of pending attributes.
444  *
445  * @param src source node
446  */
447  virtual void
449 
450  /**
451  * Retrieve the result prefix corresponding to a namespace.
452  *
453  * @param theNamespace namespace for prefix
454  *
455  * @return A pointer to a string containing the prefix, or 0 if the namespace is not mapped.
456  */
457  virtual const XalanDOMString*
458  getResultPrefixForNamespace(const XalanDOMString& theNamespace) const = 0;
459 
460  /**
461  * Retrieve the result namespace corresponding to a prefix.
462  *
463  * @param thePrefix prefix for namespace
464  *
465  * @return A pointer to a string containing the namespace, or 0 if the prefix is not mapped.
466  */
467  virtual const XalanDOMString*
468  getResultNamespaceForPrefix(const XalanDOMString& thePrefix) const = 0;
469 
470  /**
471  * Determine whether or not a prefix is in use on the pending element or
472  * the pending attributes.
473  *
474  * @param thePrefix prefix for namespace
475  *
476  * @return true if the prefix is in use, false if not.
477  */
478  virtual bool
479  isPendingResultPrefix(const XalanDOMString& thePrefix) = 0;
480 
481 
482  /**
483  * Generate a random namespace prefix guaranteed to be unique.
484  *
485  * @param theValue A string for returning the new prefix
486  */
487  virtual void
489 
490  /**
491  * Retrieve the current number of spaces to indent.
492  *
493  * @return number of spaces
494  */
495  virtual int
496  getIndent() const = 0;
497 
498  /**
499  * Set the current number of spaces to indent.
500  *
501  * @param indentAmount The number of spaces to indent. Use -1 for the default amount.
502  */
503  virtual void
504  setIndent(int indentAmount) = 0;
505 
506  /**
507  * Create and initialize an xpath and return it. This is to be used to
508  * create an XPath that is only used during execution.
509  *
510  * @param str string expression for XPath evaluation
511  * @param resolver resolver for namespace resolution
512  * @return pointer to resulting XPath
513  */
514  virtual const XPath*
516  const XalanDOMString& str,
517  const PrefixResolver& resolver) = 0;
518 
519  /**
520  * Return the XPath created by createMatchPattern().
521  *
522  * @param xpath The XPath to return.
523  */
524  virtual void
525  returnXPath(const XPath* xpath) = 0;
526 
527  // A helper class to automatically return an XPath instance.
529  {
530  public:
531 
534  const XPath* xpath = 0) :
535  m_context(context),
536  m_xpath(xpath)
537  {
538  }
539 
541  {
542  if (m_xpath != 0)
543  {
544  m_context.returnXPath(m_xpath);
545  }
546  }
547 
548  const XPath*
549  get() const
550  {
551  return m_xpath;
552  }
553 
554  const XPath*
556  {
557  const XPath* const temp = m_xpath;
558 
559  m_xpath = 0;
560 
561  return temp;
562  }
563 
564  void
565  reset(const XPath* xpath)
566  {
567  if (m_xpath != 0)
568  {
569  m_context.returnXPath(m_xpath);
570  }
571 
572  m_xpath = xpath;
573  }
574 
575  private:
576 
577  StylesheetExecutionContext& m_context;
578 
579  const XPath* m_xpath;
580  };
581 
583 
584  /**
585  * Set a list of top level variables in the specified execution context
586  * stylesheet.
587  *
588  * @param topLevelParams list of top level parameters
589  */
590  virtual void
591  pushTopLevelVariables(const ParamVectorType& topLevelParams) = 0;
592 
593  /**
594  * Execute the supplied XPath and and create a
595  * variable in the current context.
596  *
597  * @param str string expression for XPath evaluation
598  * @param contextNode current node in the source tree
599  * @param resolver resolver for namespace resolution
600  * @return a pointer to the XObject result
601  */
602  virtual const XObjectPtr
604  const XPath& xpath,
605  XalanNode* contextNode,
606  const PrefixResolver& resolver) = 0;
607 
608 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
609  /**
610  * Create an ResultTreeFragment as a variable and push it
611  * on to the stack with the current context.
612  *
613  * @param templateChild result tree fragment to use.
614  * @param sourceNode source node
615  * @return a pointer to the XObject result
616  */
617  virtual const XObjectPtr
618  createVariable(
619  const ElemTemplateElement& templateChild,
620  XalanNode* sourceNode) = 0;
621 #endif
622 
623  /**
624  * Execute an XPath using the provided expression,
625  * and push the result as a variable in the context of
626  * the supplied element.
627  *
628  * @param name name of variable
629  * @param element element marker for variable
630  * @param str string expression for XPath evaluation
631  * @param contextNode current node in the source tree
632  * @param resolver resolver for namespace resolution
633  * @return nothing
634  */
635  virtual void
637  const XalanQName& name,
638  const ElemTemplateElement* element,
639  const XalanDOMString& str,
640  XalanNode* contextNode,
641  const PrefixResolver& resolver) = 0;
642 
643  /**
644  * Execute the supplied XPath and push the result as a
645  * variable in the current context.
646  *
647  * @param name name of variable
648  * @param element element marker for variable
649  * @param str string expression for XPath evaluation
650  * @param contextNode current node in the source tree
651  * @param resolver resolver for namespace resolution
652  * @return nothing
653  */
654  virtual void
656  const XalanQName& name,
657  const ElemTemplateElement* element,
658  const XPath& xpath,
659  XalanNode* contextNode,
660  const PrefixResolver& resolver) = 0;
661 
662 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
663  /**
664  * Create an ResultTreeFragment as a variable and push it
665  * on to the stack with the current context.
666  *
667  * @param name name of variable
668  * @param element element marker for variable
669  * @param templateChild result tree fragment to use.
670  * @param sourceNode source node
671  */
672  virtual void
673  pushVariable(
674  const XalanQName& name,
675  const ElemTemplateElement* element,
676  const ElemTemplateElement& templateChild,
677  XalanNode* sourceNode) = 0;
678 #endif
679 
680  /**
681  * Push a named variable onto the variables stack.
682  * The variable has already been evaluated.
683  *
684  * @param name name of variable
685  * @param val pointer to XObject value
686  * @param element element marker for variable
687  */
688  virtual void
690  const XalanQName& name,
691  const XObjectPtr val,
692  const ElemTemplateElement* element) = 0;
693 
694  /**
695  * Push a named variable onto the processor variable stack
696  * The variable will be evaluated when first referenced.
697  *
698  * @param name name of variable
699  * @param var pointer to ElemVariable instance
700  * @param element element marker for variable
701  */
702  virtual void
704  const XalanQName& name,
705  const ElemVariable* var,
706  const ElemTemplateElement* element) = 0;
707 
708  /**
709  * Push a context marker onto the stack to let us know when to stop
710  * searching for a var.
711  */
712  virtual void
714 
715  /**
716  * Pop the current context from the current context stack.
717  */
718  virtual void
720 
721 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
722  /*
723  * A class to manage pushing and popping an element's stack
724  * frame context.
725  */
726  class PushAndPopContextMarker
727  {
728  public:
729 
730  PushAndPopContextMarker(StylesheetExecutionContext& executionContext) :
731  m_executionContext(executionContext)
732  {
733  executionContext.pushContextMarker();
734  }
735 
736  PushAndPopContextMarker(
737  StylesheetExecutionContext& executionContext,
738  int& currentStackFrameIndex) :
739  m_executionContext(executionContext)
740  {
741  currentStackFrameIndex = executionContext.getCurrentStackFrameIndex();
742 
743  executionContext.pushContextMarker();
744  }
745 
746  ~PushAndPopContextMarker()
747  {
748  m_executionContext.popContextMarker();
749  }
750 
752  getExecutionContext() const
753  {
754  return m_executionContext;
755  }
756 
757  private:
758 
759  StylesheetExecutionContext& m_executionContext;
760  };
761 #endif
762 
763  /**
764  * Resolve the params that were pushed by the caller.
765  */
766  virtual void
768 
769  /**
770  * Reset the vector of top level parameters.
771  */
772  virtual void
774 
775 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
776  class ResolveAndClearTopLevelParams
777  {
778  public:
779 
780  ResolveAndClearTopLevelParams(StylesheetExecutionContext& executionContext) :
781  m_executionContext(executionContext)
782  {
783  m_executionContext.resolveTopLevelParams();
784  }
785 
786  ~ResolveAndClearTopLevelParams()
787  {
788  m_executionContext.clearTopLevelParams();
789  }
790 
791  private:
792 
793  StylesheetExecutionContext& m_executionContext;
794  };
795 
796  /**
797  * Given a template, search for the arguments and push them on the stack.
798  * Also, push default arguments on the stack.
799  *
800  * @param xslCallTemplateElement "call-template" element
801  */
802  virtual void
803  pushParams(const ElemTemplateElement& xslCallTemplateElement) = 0;
804 
805 #else
806 
807  /**
808  * Initiate context to accept a new set of parameters
809  */
810  virtual void beginParams() = 0;
811 
812  /**
813  * Indicate parameter set is complete
814  */
815  virtual void endParams() = 0;
816 
817  /**
818  * Push a single paramter onto the latest initialized paramter set
819  * @param qName the name of the parameter
820  * @param theValue the value of the parameter
821  */
822  virtual void pushParam(const XalanQName& qName,const XObjectPtr& theValue) = 0;
823 #endif
824 
825  /**
826  * Given a name, return a string representing the value, but don't look in
827  * the global space.
828  *
829  * @param theName name of variable
830  * @return An XObjectPtr instance. Call XObjectPtr::null() on the instance
831  * to determine if the variable was found. If XObjectPtr::null()
832  * returns true, the variable was not found, and no other operations
833  * on the XObject instance are permitted.
834  */
835  virtual const XObjectPtr
836  getParamVariable(const XalanQName& theName) = 0;
837 
838  /**
839  * Push a frame marker for an element.
840  *
841  * @param elem the element
842  */
843  virtual void
845 
846  /**
847  * Pop a frame marker for an element.
848  *
849  * @param elem the element
850  */
851  virtual void
853 
854 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
855  /*
856  * A class to manage pushing and popping an element's stack
857  * frame context.
858  */
859  class PushAndPopElementFrame
860  {
861  public:
862 
863  PushAndPopElementFrame(
864  StylesheetExecutionContext& executionContext,
865  const ElemTemplateElement* element) :
866  m_executionContext(executionContext)
867  {
868  executionContext.pushElementFrame(element);
869  }
870 
871  ~PushAndPopElementFrame()
872  {
873  m_executionContext.popElementFrame();
874  }
875 
876  private:
877 
878  StylesheetExecutionContext& m_executionContext;
879  };
880 #endif
881 
882  /**
883  * Get the top of the global stack frame.
884  *
885  * @return current value of index
886  */
887  virtual int
889 
890  /**
891  * Get the top of the stack frame from where a search
892  * for a variable or param should take place.
893  *
894  * @return current value of index
895  */
896  virtual int
898 
899  /**
900  * Set the top of the stack frame from where a search
901  * for a variable or param should take place.
902  *
903  * @param currentStackFrameIndex new value of index
904  */
905  virtual void
906  pushCurrentStackFrameIndex(int currentStackFrameIndex = -1) = 0;
907 
908  /**
909  * Pop the last stack frame index setting
910  */
911  virtual void
913 
914  /*
915  * A class to manage the state of the variable stacks frame index.
916  */
918  {
919  public:
920 
922  StylesheetExecutionContext& executionContext,
923  int newIndex) :
924  m_executionContext(executionContext),
925  m_savedIndex(executionContext.getCurrentStackFrameIndex())
926  {
927  executionContext.pushCurrentStackFrameIndex(newIndex);
928  }
929 
931  {
932  m_executionContext.popCurrentStackFrameIndex();
933  }
934 
935  private:
936 
937  StylesheetExecutionContext& m_executionContext;
938 
939  const int m_savedIndex;
940  };
941 
942 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
943  /*
944  * A class to manage stack state during execution.
945  */
946  class ParamsPushPop : public PushAndPopContextMarker
947  {
948  public:
949 
950  ParamsPushPop(
951  StylesheetExecutionContext& executionContext,
952  const ElemTemplateElement& xslCallTemplateElement) :
953  PushAndPopContextMarker(executionContext)
954  {
955  doPush(xslCallTemplateElement);
956  }
957 
958  ParamsPushPop(
959  StylesheetExecutionContext& executionContext,
960  const ElemTemplateElement& xslCallTemplateElement,
961  int& savedStackFrameIndex) :
962  PushAndPopContextMarker(executionContext, savedStackFrameIndex)
963  {
964  doPush(
965  xslCallTemplateElement,
966  savedStackFrameIndex);
967  }
968 
969  ~ParamsPushPop()
970  {
971  }
972 
973  private:
974 
975  void
976  doPush(
977  const ElemTemplateElement& xslCallTemplateElement,
978  int stackFrameIndex);
979 
980  void
981  doPush(const ElemTemplateElement& xslCallTemplateElement);
982  };
983 #endif
984 
985  /**
986  * Receive notification of the beginning of a document.
987  *
988  * <p>The SAX parser will invoke this method only once, before any
989  * other methods in this interface or in DTDHandler (except for
990  * setDocumentLocator).</p>
991  *
992  * @exception SAXException
993  */
994  virtual void
996 
997  /**
998  * Receive notification of the end of a document.
999  *
1000  * <p>The SAX parser will invoke this method only once, and it will
1001  * be the last method invoked during the parse. The parser shall
1002  * not invoke this method until it has either abandoned parsing
1003  * (because of an unrecoverable error) or reached the end of
1004  * input.</p>
1005  *
1006  * @exception SAXException
1007  */
1008  virtual void
1010 
1011  /**
1012  * Receive notification of the beginning of an element.
1013  *
1014  * @param name element type name
1015  */
1016  virtual void
1017  startElement(const XalanDOMChar* name) = 0;
1018 
1019  /**
1020  * Receive notification of the end of an element.
1021  *
1022  * @param name element type name
1023  */
1024  virtual void
1025  endElement(const XalanDOMChar* name) = 0;
1026 
1027  /**
1028  * Receive notification of character data.
1029  *
1030  * @param ch pointer to characters from the XML document
1031  * @param start start position in the array
1032  * @param length number of characters to read from the array
1033  */
1034  virtual void
1036  const XalanDOMChar* ch,
1037  fl_size_type start,
1038  fl_size_type length) = 0;
1039 
1040  /**
1041  * Receive notification of character data. If available, when the
1042  * disable-output-escaping attribute is used, output raw text without
1043  * escaping.
1044  *
1045  * @param ch pointer to characters from the XML document
1046  * @param start start position in the array
1047  * @param length number of characters to read from the array
1048  */
1049  virtual void
1051  const XalanDOMChar* ch,
1052  fl_size_type start,
1053  fl_size_type length) = 0;
1054 
1055  /**
1056  * Called when a Comment is to be constructed.
1057  *
1058  * @param data pointer to comment data
1059  */
1060  virtual void
1061  comment(const XalanDOMChar* data) = 0;
1062 
1063  /**
1064  * Receive notification of a processing instruction.
1065  *
1066  * @param target processing instruction target
1067  * @param data processing instruction data, or null if none was supplied
1068  */
1069  virtual void
1071  const XalanDOMChar* target,
1072  const XalanDOMChar* data) = 0;
1073 
1074  /**
1075  * Flush the pending element.
1076  */
1077  virtual void
1079 
1080  /**
1081  * Clone a node to the result tree
1082  *
1083  * @param node node to clone
1084  * @param locator The Locator, if any
1085  */
1086  virtual void
1088  const XalanNode& node,
1089  const Locator* locator) = 0;
1090 
1091  /**
1092  * Clone a node to the result tree
1093  *
1094  * @param node node to clone
1095  * @param nodeType the type of the node
1096  * @param overrideStrip false if white space stripping should be done
1097  * @param shouldCloneAttributes true if attributes should be cloned
1098  * @param locator The Locator, if any
1099  */
1100  virtual void
1102  const XalanNode& node,
1103  XalanNode::NodeType nodeType,
1104  bool overrideStrip,
1105  bool shouldCloneAttributes,
1106  const Locator* locator) = 0;
1107 
1108 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1109  /**
1110  * Initiate creation of a result tree fragment
1111  * @param sourceNode the source Node
1112  */
1113  virtual void
1115  XalanNode* sourceNode) = 0;
1116 
1117  /**
1118  * Indicate sthe completion of result tree fragment
1119  * @return a pointer to the result tree fragment
1120  */
1121  virtual const XObjectPtr
1123 
1124  /**
1125  * Initiate to put execution result in string
1126  *
1127  * @param theResult the string to contain the result
1128  */
1129  virtual void
1131  XalanDOMString& theResult) = 0;
1132 
1133  /**
1134  * Indicates the completion of the result string
1135  *
1136  */
1137  virtual void
1139 #else
1140  /**
1141  * Create an XObject that represents a Result tree fragment.
1142  *
1143  * @param templateChild result tree fragment to use.
1144  * @param sourceNode source node
1145  * @return XObject instance
1146  */
1147  virtual const XObjectPtr
1148  createXResultTreeFrag(
1149  const ElemTemplateElement& templateChild,
1150  XalanNode* sourceNode) = 0;
1151 #endif
1152 
1153  /**
1154  * Output an object to the result tree by doing the right conversions.
1155  * This is public for access by extensions.
1156  *
1157  * @param obj the XObject to output
1158  * @param locator The Locator, if any
1159  */
1160  virtual void
1162  const XObject& xobj,
1163  const Locator* locator) = 0;
1164 
1165  /**
1166  * Given a result tree fragment, walk the tree and
1167  * output it to the result stream.
1168  *
1169  * @param theTree result tree fragment
1170  * @param locator The Locator, if any
1171  */
1172  virtual void
1174  const XObject& theTree,
1175  const Locator* locator) = 0;
1176 
1177  /**
1178  * Determine the full XSLT Namespace URI.
1179  *
1180  * @return Xalan namespace URI
1181  */
1182  virtual const XalanDOMString&
1183  getXSLNameSpaceURL() const = 0;
1184 
1185  /**
1186  * Special Xalan namespace for built-in extensions.
1187  *
1188  * @return Xalan namespace for extensions
1189  */
1190  virtual const XalanDOMString&
1192 
1193  /**
1194  * Determine if an element is on the recursion stack.
1195  *
1196  * @return true if element on stack
1197  */
1198  virtual bool
1199  findOnElementRecursionStack(const ElemTemplateElement* theElement) const = 0;
1200 
1201  /**
1202  * Push an element onto the recursion stack.
1203  *
1204  * @param theElement pointer to element to push
1205  */
1206  virtual void
1208 
1209  /**
1210  * Pop an element off the recursion stack.
1211  *
1212  * @return pointer to element popped
1213  */
1214  virtual const ElemTemplateElement*
1216 
1217  /**
1218  * Class for keeping track of elements pushed on the element recursion stack
1219  */
1221  {
1222  public:
1223 
1224  /**
1225  * Construct an instance of the recursion stack pusher.
1226  *
1227  * @param executionContext current execution context
1228  * @param element pointer to element to push
1229  */
1231  StylesheetExecutionContext& executionContext,
1232  const ElemTemplateElement* element) :
1233  m_executionContext(executionContext)
1234  {
1235  m_executionContext.pushOnElementRecursionStack(element);
1236  }
1237 
1239  {
1240  m_executionContext.popElementRecursionStack();
1241  }
1242 
1243  private:
1244 
1245  StylesheetExecutionContext& m_executionContext;
1246  };
1247 
1248 
1249  /**
1250  * This is a hook that XResultTreeFrag instances (which are reference
1251  * counted), can notify the owning StylesheetExecutionContext instance
1252  * when they are dereferenced and can be cleaned up.
1253  *
1254  * @param theXResultTreeFrag The instance that is being returned.
1255  *
1256  * @return true if the XResultTreeFrag instance belongs to the execution context. false if not.
1257  */
1258  virtual bool
1259  returnXResultTreeFrag(XResultTreeFrag* theXResultTreeFrag) = 0;
1260 
1261 
1262  enum eDummy
1263  {
1264  eDefaultXMLIndentAmount = 0,
1265  eDefaultHTMLIndentAmount = 0
1266  };
1267 
1268  /**
1269  * Enums to determine whether or not run-time escaping of URLs has been set.
1270  */
1272  {
1273  eEscapeURLsDefault, // Use the value in the stylesheet
1274  eEscapeURLsNo, // Don't escape URLs
1275  eEscapeURLsYes // Escape URLs
1276  };
1277 
1278  /**
1279  * Get the value for run-time escaping of URLs. This can
1280  * override the property specified by the stylesheet. The
1281  * default behavior is to honor the property in the stylesheet.
1282  *
1283  * @return The value of the enum
1284  */
1285  virtual eEscapeURLs
1286  getEscapeURLs() const = 0;
1287 
1288  /**
1289  * Set the value for run-time escaping of URLs. This can
1290  * override the property specified by the stylesheet. The
1291  * default behavior is to honor the property in the stylesheet.
1292  *
1293  * @param value The value of the enum
1294  */
1295  virtual void
1297 
1298 
1299  /**
1300  * Enums to determine whether or not run-time omission of the META tag has been set.
1301  */
1303  {
1304  eOmitMETATagDefault, // Use the value in the stylesheet
1305  eOmitMETATagNo, // Don't omit the META tag
1306  eOmitMETATagYes // Omit the META tag
1307  };
1308 
1309  /**
1310  * Get the value for run-time omission of URLs. This can
1311  * override the property specified by the stylesheet. The
1312  * default behavior is to honor the property in the stylesheet.
1313  *
1314  * @return The value of the enum
1315  */
1316  virtual eOmitMETATag
1317  getOmitMETATag() const = 0;
1318 
1319  /**
1320  * Get the value for run-time omission of URLs. This can
1321  * override the property specified by the stylesheet. The
1322  * default behavior is to honor the property in the stylesheet.
1323  *
1324  * @param value The value of the enum
1325  */
1326  virtual void
1328 
1329  /**
1330  * Create a new FormatterToXML instance. The execution context
1331  * owns the instance and will delete it when reset.
1332  *
1333  * @param writer character output stream to use
1334  * @param version version of the output method
1335  * @param doIndent true if output is to be indented
1336  * @param indent number of spaces to indent at each nesting level
1337  * @param encoding character encoding for the writer
1338  * @param mediaType media type (MIME content type) of the data
1339  * @param doctypeSystem system identifier to be used in the document
1340  * type declaration
1341  * @param doctypePublic public identifier to be used in the document
1342  * type declaration
1343  * @param xmlDecl true if the XSLT processor should output an XML
1344  * declaration
1345  * @param standalone true if the XSLT processor should output a
1346  * standalone document declaration
1347  * @return a pointer to the new instance.
1348  */
1349 
1350  virtual FormatterListener*
1352  Writer& writer,
1354  bool doIndent = false,
1355  int indent = eDefaultXMLIndentAmount,
1360  bool xmlDecl = true,
1361  const XalanDOMString& standalone = XalanDOMString(XalanMemMgrs::getDummyMemMgr())) = 0;
1362 
1363  /**
1364  * Create a new FormatterToHTML instance. The execution context
1365  * owns the instance and will delete it when reset.
1366  *
1367  * @param writer character output stream to use
1368  * @param encoding character encoding for the writer
1369  * @param mediaType media type (MIME content type) of the data
1370  * @param doctypeSystem system identifier to be used in the document
1371  * type declaration
1372  * @param doctypePublic public identifier to be used in the document
1373  * type declaration
1374  * @param doIndent true if output is to be indented
1375  * @param indent number of spaces to indent at each nesting level
1376  * @param escapeURLs Whether or not to escape URLs according to the recommendation. The default is true.
1377  * @param omitMetaTag Whether or not to output a META TAG according to the recommendation. The default is false.
1378  * @return a pointer to the new instance.
1379  */
1380  virtual FormatterListener*
1382  Writer& writer,
1387  bool doIndent = true,
1388  int indent = eDefaultHTMLIndentAmount,
1389  bool escapeURLs = true,
1390  bool omitMetaTag = false) = 0;
1391 
1392  /**
1393  * FormatterToText instance constructor.
1394  *
1395  * @param writer writer for output
1396  * @param encoding character encoding for the writer
1397  */
1398  virtual FormatterListener*
1400  Writer& writer,
1401  const XalanDOMString& encoding) = 0;
1402 
1403 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1404  class BorrowReturnFormatterToText
1405  {
1406  public:
1407 
1408  BorrowReturnFormatterToText(
1409  StylesheetExecutionContext& executionContext,
1410  Writer& writer,
1411  bool normalizeLinefeed = true,
1412  bool handleIgnorableWhitespace = true);
1413 
1414  ~BorrowReturnFormatterToText()
1415  {
1416  assert(m_formatter != 0);
1417 
1418  m_executionContext.returnFormatterToText(m_formatter);
1419  }
1420 
1422  operator*() const
1423  {
1424  assert(m_formatter != 0);
1425 
1426  return *m_formatter;
1427  }
1428 
1430  get() const
1431  {
1432  assert(m_formatter != 0);
1433 
1434  return m_formatter;
1435  }
1436 
1438  operator->() const
1439  {
1440  return get();
1441  }
1442 
1443  private:
1444 
1445  StylesheetExecutionContext& m_executionContext;
1446 
1447  FormatterToText* m_formatter;
1448  };
1449 
1450 
1451  friend class BorrowReturnFormatterToText;
1452 #endif
1453 
1454 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1455  /**
1456  * Get node sorter instance
1457  */
1458  virtual NodeSorter*
1460 
1461 #else
1462  /**
1463  * Borrow a cached NodeSorter instance.
1464  *
1465  * @return A pointer to the instance.
1466  */
1467  virtual NodeSorter*
1468  borrowNodeSorter() = 0;
1469 
1470  /**
1471  * Return a previously borrowed NodeSorter instance.
1472  *
1473  * @param theSorter A pointer the to previously borrowed instance.
1474  * @return true if the instance was previously borrowed, false if not.
1475  */
1476  virtual bool
1477  returnNodeSorter(NodeSorter* theSorter) = 0;
1478 
1479  class BorrowReturnNodeSorter
1480  {
1481  public:
1482 
1483  BorrowReturnNodeSorter(StylesheetExecutionContext& executionContext) :
1484  m_executionContext(executionContext),
1485  m_sorter(executionContext.borrowNodeSorter())
1486  {
1487  assert(m_sorter != 0);
1488  }
1489 
1490  ~BorrowReturnNodeSorter()
1491  {
1492  assert(m_sorter != 0);
1493 
1494  m_executionContext.returnNodeSorter(m_sorter);
1495  }
1496 
1497  NodeSorter&
1498  operator*() const
1499  {
1500  assert(m_sorter != 0);
1501 
1502  return *m_sorter;
1503  }
1504 
1505  NodeSorter*
1506  get() const
1507  {
1508  assert(m_sorter != 0);
1509 
1510  return m_sorter;
1511  }
1512 
1513  NodeSorter*
1514  operator->() const
1515  {
1516  return get();
1517  }
1518 
1519  private:
1520 
1521  StylesheetExecutionContext& m_executionContext;
1522 
1523  NodeSorter* m_sorter;
1524  };
1525 #endif
1526 
1528 
1529  /**
1530  * Create a new XalanNumberFormat instance.
1531  *
1532  * @return an XalanNumberFormatAutoPtr that owns a new
1533  * XalanNumberFormat instance.
1534  */
1535  virtual XalanNumberFormatAutoPtr
1537 
1538 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1539  /*
1540  * A class to manage the attribute sets that have been executed
1541  * by an element
1542  */
1544  {
1546  attributeSetNameIndex(0),
1547  matchingAttributeSetIndex(0) {}
1548 
1551 
1552 
1553  };
1554 
1555  virtual void
1557 
1558  virtual UseAttributeSetIndexes&
1560 
1561  virtual void
1563 
1564  /**
1565  * Push the element that will invoke
1566  * non children elements (i.e templates, attribute-sets)
1567  *
1568  * @param invokers the element that will invoke non children elements
1569  */
1570  virtual void
1571  pushInvoker(const ElemTemplateElement * invoker) = 0;
1572 
1573  /**
1574  * Pop the element that invoked non children elements
1575  */
1576  virtual void
1577  popInvoker() = 0;
1578 
1579  /**
1580  * Get the lastest element that has invoked
1581  * a non-child element
1582  */
1583  virtual const ElemTemplateElement*
1584  getInvoker() const = 0;
1585 #endif
1586 
1587  /**
1588  * Determine the number of trace listeners.
1589  *
1590  * @return number of listeners
1591  */
1592  virtual tl_size_type
1593  getTraceListeners() const = 0;
1594 
1595  /**
1596  * Fire a generate event.
1597  *
1598  * @param ge generate event to fire
1599  */
1600  virtual void
1602 
1603  /**
1604  * Fire a trace event.
1605  *
1606  * @param te trace event to fire
1607  */
1608  virtual void
1609  fireTraceEvent(const TracerEvent& te) = 0;
1610 
1611  /**
1612  * Fire a selection event.
1613  *
1614  * @param se selection event to fire
1615  */
1616  virtual void
1618 
1619  /**
1620  * If this is set to true, simple traces of template calls are made.
1621  *
1622  * @return true if traces made
1623  */
1624  virtual bool
1625  getTraceSelects() const = 0;
1626 
1627  /**
1628  * Compose a diagnostic trace of the current selection
1629  *
1630  * @param theStylesheetElement The executing stylesheet element
1631  * @param nl The list of selected nodes
1632  * @param xpath A pointer to the XPath which generated the list of nodes, if any.
1633  */
1634  virtual void
1636  const ElemTemplateElement& theStylesheetElement,
1637  const NodeRefListBase& nl,
1638  const XPath* xpath) = 0;
1639 
1640  /**
1641  * Compare two strings using the collation of the
1642  * current locale.
1643  *
1644  * @param theLHS a string to compare
1645  * @param theRHS a string to compare
1646  * @param theCaseOrder the case order for the comparison
1647  * @return < 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS
1648  */
1649  virtual int
1651  const XalanDOMString& theLHS,
1652  const XalanDOMString& theRHS,
1654 
1655  /**
1656  * Compare two strings using the collation of the
1657  * supplied locale.
1658  *
1659  * @param theLHS a string to compare
1660  * @param theRHS a string to compare
1661  * @param theLocal a string that specifies the locale
1662  * @param theCaseOrder the case order for the comparison
1663  * @return < 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS
1664  */
1665  virtual int
1667  const XalanDOMString& theLHS,
1668  const XalanDOMString& theRHS,
1669  const XalanDOMString& theLocale,
1671 
1672  /**
1673  * Compare two strings using the collation of the
1674  * current locale.
1675  *
1676  * @param theLHS a string to compare
1677  * @param theRHS a string to compare
1678  * @param theCaseOrder the case order for the comparison
1679  * @return < 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS
1680  */
1681  virtual int
1683  const XalanDOMChar* theLHS,
1684  const XalanDOMChar* theRHS,
1686 
1687  /**
1688  * Compare two strings using the collation of the
1689  * current locale.
1690  *
1691  * @param theLHS a string to compare
1692  * @param theRHS a string to compare
1693  * @param theLocal a string that specifies the locale
1694  * @param theCaseOrder the case order for the comparison
1695  * @return < 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS
1696  */
1697  virtual int
1699  const XalanDOMChar* theLHS,
1700  const XalanDOMChar* theRHS,
1701  const XalanDOMChar* theLocale,
1703 
1704  /**
1705  * Create a PrintWriter for the provided stream.
1706  *
1707  * @param theTextOutputStream The output stream for the PrintWriter.
1708  * @return The new instance.
1709  */
1710  virtual PrintWriter*
1711  createPrintWriter(XalanOutputStream* theTextOutputStream) = 0;
1712 
1713  /**
1714  * Create a PrintWriter. Create an appropriate output stream
1715  * using the provided file name and encoding.
1716  *
1717  * @param theFileName The file name for the output stream
1718  * @param theEncoding The encoding for the output stream
1719  * @return The new instance.
1720  */
1721  virtual PrintWriter*
1723  const XalanDOMString& theFileName,
1724  const XalanDOMString& theEncoding) = 0;
1725 
1726  /**
1727  * Create a PrintWriter using the provided ostream instance.
1728  *
1729  * @param theStream The output stream for the PrintWriter.
1730  * @return The new instance.
1731  */
1732  virtual PrintWriter*
1734 
1735  /**
1736  * Create a PrintWriter using the provided FILE instance.
1737  *
1738  * @param theStream The output stream for the PrintWriter.
1739  * @return The new instance.
1740  */
1741  virtual PrintWriter*
1742  createPrintWriter(FILE* theStream) = 0;
1743 
1744  /**
1745  * Get the counters table, which is a table of cached
1746  * results that is used by ElemNumber.
1747  *
1748  * @return A reference to the counters table.
1749  */
1750  virtual CountersTable&
1752 
1753  /**
1754  * Send character data from a node to the result tree.
1755  *
1756  * @param node The node to send.
1757  */
1758  virtual void
1759  characters(const XalanNode& node) = 0;
1760 
1761  /**
1762  * Send character data from an XObject to the result tree.
1763  *
1764  * @param node The xobject to send.
1765  */
1766  virtual void
1767  characters(const XObjectPtr& xobject) = 0;
1768 
1769  /**
1770  * Send raw character data from a node to the result tree.
1771  *
1772  * @param node The node to send.
1773  * @param length number of characters to read from the array
1774  */
1775  virtual void
1776  charactersRaw(const XalanNode& node) = 0;
1777 
1778  /**
1779  * Send raw character data from an XObject to the result tree.
1780  *
1781  * @param node The xobject to send.
1782  */
1783  virtual void
1784  charactersRaw(const XObjectPtr& xobject) = 0;
1785 
1786 
1787  // These interfaces are inherited from XPathExecutionContext...
1788 
1789  virtual void
1790  reset() = 0;
1791 
1792  virtual XalanNode*
1793  getCurrentNode() const = 0;
1794 
1795  virtual void
1796  pushCurrentNode(XalanNode* theCurrentNode) = 0;
1797 
1798  virtual void
1800 
1801  virtual bool
1803  const XalanNode& node1,
1804  const XalanNode& node2) const = 0;
1805 
1806  virtual void
1808 
1809  virtual void
1811 
1812  virtual const NodeRefListBase&
1813  getContextNodeList() const = 0;
1814 
1815  virtual size_type
1817 
1818  virtual size_type
1819  getContextNodeListPosition(const XalanNode& contextNode) const = 0;
1820 
1821  /**
1822  * Determine if an external element is available.
1823  *
1824  * @param theQName The QName of the element
1825  *
1826  * @return whether the given element is available or not
1827  */
1828  virtual bool
1829  elementAvailable(const XalanQName& theQName) const = 0;
1830 
1831  /**
1832  * Determine if an external element is available by resolving
1833  * a string to a QName.
1834  *
1835  * @param theName The name of the element
1836  * @param locator A Locator instance for error reporting
1837  *
1838  * @return whether the given element is available or not
1839  */
1840  virtual bool
1842  const XalanDOMString& theName,
1843  const Locator* locator) const = 0;
1844 
1845  /**
1846  * Determine if a function is available.
1847  *
1848  * @param theQName The QName of the function
1849  *
1850  * @return whether the function is available or not
1851  */
1852  virtual bool
1853  functionAvailable(const XalanQName& theQName) const = 0;
1854 
1855  /**
1856  * Determine if a function is available.
1857  *
1858  * @param theName The name of the function
1859  * @param locator A Locator instance for error reporting
1860  *
1861  * @return whether the function is available or not
1862  */
1863  virtual bool
1865  const XalanDOMString& theName,
1866  const Locator* locator) const = 0;
1867 
1868  virtual const XObjectPtr
1870  const XalanDOMString& theNamespace,
1871  const XalanDOMString& functionName,
1872  XalanNode* context,
1873  const XObjectArgVectorType& argVec,
1874  const Locator* locator) = 0;
1875 
1876  virtual XalanDocument*
1878  MemoryManager& theManager,
1879  const XalanDOMString& urlString,
1880  const XalanDOMString& base,
1881  ErrorHandler* theErrorHandler = 0) const = 0;
1882 
1883  virtual MutableNodeRefList*
1885 
1886  virtual bool
1888 
1889  virtual MutableNodeRefList*
1890  createMutableNodeRefList(MemoryManager& theManager) const = 0;
1891 
1892 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1893 
1894  virtual MutableNodeRefList&
1896 
1897  virtual void
1899 
1900  virtual void
1901  pushXObjectPtr(const XObjectPtr& xobjectPtr) = 0;
1902 
1903  virtual void
1905 
1906  virtual void
1908 
1909  virtual XalanNode*
1911 
1912  virtual void
1914 
1915  /**
1916  * Get a string that is cached on a stack
1917  * @returns a cached string
1918  */
1919  virtual XalanDOMString&
1921 
1922  /**
1923  * Gets the last string that was cached on the stack
1924  * @returns the last string to be cached
1925  */
1926  virtual XalanDOMString&
1928 
1929  /**
1930  * Gets the last string to be cached on the stack and
1931  * pops it from the stack. The reference is valid until
1932  * the next request is made for a cached string
1933  *
1934  * @returns the last string to be cached
1935  */
1936  virtual XalanDOMString&
1938 #endif
1939 
1940  virtual XalanDOMString&
1942 
1943  virtual bool
1945 
1946 
1947  virtual void
1949  XalanNode* context,
1950  const XalanQName& qname,
1951  const XalanDOMString& ref,
1952  const Locator* locator,
1953  MutableNodeRefList& nodelist) = 0;
1954 
1955  virtual void
1957  XalanNode* context,
1958  const XalanDOMString& name,
1959  const XalanDOMString& ref,
1960  const Locator* locator,
1961  MutableNodeRefList& nodelist) = 0;
1962 
1963  virtual const XObjectPtr
1965  const XalanQName& name,
1966  const Locator* locator = 0) = 0;
1967 
1968  virtual const PrefixResolver*
1969  getPrefixResolver() const = 0;
1970 
1971  virtual void
1972  setPrefixResolver(const PrefixResolver* thePrefixResolver) = 0;
1973 
1974  virtual const XalanDOMString*
1975  getNamespaceForPrefix(const XalanDOMString& prefix) const = 0;
1976 
1977  virtual const XalanDOMString&
1978  findURIFromDoc(const XalanDocument* owner) const = 0;
1979 
1980  virtual const XalanDOMString&
1982  const XalanDOMString& theName,
1983  const XalanDocument& theDocument) const = 0;
1984 
1985  virtual bool
1987 
1988  virtual XalanDocument*
1989  getSourceDocument(const XalanDOMString& theURI) const = 0;
1990 
1991  virtual void
1993  const XalanDOMString& theURI,
1994  XalanDocument* theDocument) = 0;
1995 
1996  virtual void
1998  double number,
1999  const XalanDOMString& pattern,
2000  XalanDOMString& theResult,
2001  const XalanNode* context = 0,
2002  const Locator* locator = 0) = 0;
2003 
2004  virtual void
2006  double number,
2007  const XalanDOMString& pattern,
2008  const XalanDOMString& dfsName,
2009  XalanDOMString& theResult,
2010  const XalanNode* context = 0,
2011  const Locator* locator = 0) = 0;
2012 
2013  // These interfaces are inherited from ExecutionContext...
2014 
2015  virtual void
2017  eSource source,
2018  eClassification classification,
2019  const XalanDOMString& msg,
2020  const Locator* locator,
2021  const XalanNode* sourceNode) = 0;
2022 
2023  virtual void
2025  eSource source,
2026  eClassification classification,
2027  const XalanDOMString& msg,
2028  const XalanNode* sourceNode) = 0;
2029 
2030 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
2031 protected:
2032  /**
2033  * Borrow a cached FormatterToText instance.
2034  *
2035  * @return A pointer to the instance.
2036  */
2037  virtual FormatterToText*
2038  borrowFormatterToText() = 0;
2039 
2040  /**
2041  * Return a previously borrowed FormatterToText instance.
2042  *
2043  * @param theFormatter A pointer the to previously borrowed instance.
2044  * @return true if the instance was previously borrowed, false if not.
2045  */
2046  virtual bool
2047  returnFormatterToText(FormatterToText* theFormatter) = 0;
2048 #endif
2049 };
2050 
2051 
2052 
2053 XALAN_CPP_NAMESPACE_END
2054 
2055 
2056 
2057 #endif // STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680
StylesheetExecutionContext::setRootDocument
virtual void setRootDocument(XalanNode *theDocument)=0
Set root document for stylesheet.
StylesheetExecutionContext::getAndPushCachedString
virtual XalanDOMString & getAndPushCachedString()=0
Get a string that is cached on a stack.
StylesheetExecutionContext::SetAndRestoreCurrentStackFrameIndex
Definition: StylesheetExecutionContext.hpp:918
StylesheetExecutionContext::collationCompare
virtual int collationCompare(const XalanDOMString &theLHS, const XalanDOMString &theRHS, const XalanDOMString &theLocale, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)=0
Compare two strings using the collation of the supplied locale.
StylesheetExecutionContext::resolveTopLevelParams
virtual void resolveTopLevelParams()=0
Resolve the params that were pushed by the caller.
XalanNumberFormat.hpp
StylesheetExecutionContext::cloneToResultTree
virtual void cloneToResultTree(const XalanNode &node, XalanNode::NodeType nodeType, bool overrideStrip, bool shouldCloneAttributes, const Locator *locator)=0
Clone a node to the result tree.
XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:48
StylesheetExecutionContext::getOmitMETATag
virtual eOmitMETATag getOmitMETATag() const =0
Get the value for run-time omission of URLs.
StylesheetExecutionContext::returnXPath
virtual void returnXPath(const XPath *xpath)=0
Return the XPath created by createMatchPattern().
StylesheetExecutionContext::pushCurrentStackFrameIndex
virtual void pushCurrentStackFrameIndex(int currentStackFrameIndex=-1)=0
Set the top of the stack frame from where a search for a variable or param should take place.
StylesheetExecutionContext::getCountersTable
virtual CountersTable & getCountersTable()=0
Get the counters table, which is a table of cached results that is used by ElemNumber.
StylesheetExecutionContext::getSkipElementAttributes
virtual bool getSkipElementAttributes() const =0
Get the last flag setting that determines if an element's attributes should be skipped.
StylesheetExecutionContext::pushElementFrame
virtual void pushElementFrame(const ElemTemplateElement *elem)=0
Push a frame marker for an element.
XalanCollationServices::eCaseOrder
eCaseOrder
Definition: XalanCollationServices.hpp:40
StylesheetExecutionContext::releaseCachedString
virtual bool releaseCachedString(XalanDOMString &theString)=0
Return a cached string.
StylesheetExecutionContext::beginFormatToText
virtual void beginFormatToText(XalanDOMString &theResult)=0
Initiate to put execution result in string.
StylesheetExecutionContext::formatNumber
virtual void formatNumber(double number, const XalanDOMString &pattern, const XalanDOMString &dfsName, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)=0
Formats a number according to the specified pattern.
StylesheetExecutionContext::popContextNodeList
virtual void popContextNodeList()=0
Pop the node list for current context.
StylesheetExecutionContext::ParamVectorType
XalanVector< TopLevelArg > ParamVectorType
Definition: StylesheetExecutionContext.hpp:582
XPathExecutionContext::size_type
NodeRefListBase::size_type size_type
Definition: XPathExecutionContext.hpp:85
StylesheetExecutionContext::getFormatterListener
virtual FormatterListener * getFormatterListener() const =0
Get the current formatter listener.
StylesheetExecutionContext::UseAttributeSetIndexes::UseAttributeSetIndexes
UseAttributeSetIndexes()
Definition: StylesheetExecutionContext.hpp:1545
StylesheetExecutionContext::getQuietConflictWarnings
virtual bool getQuietConflictWarnings() const =0
Determine whether conflicts should be reported.
StylesheetExecutionContext::pushCurrentMode
virtual void pushCurrentMode(const XalanQName *theMode)=0
Set the current mode.
StylesheetExecutionContext::pushParam
virtual void pushParam(const XalanQName &qName, const XObjectPtr &theValue)=0
Push a single paramter onto the latest initialized paramter set.
StylesheetExecutionContext::comment
virtual void comment(const XalanDOMChar *data)=0
Called when a Comment is to be constructed.
StylesheetExecutionContext::getUniqueNamespaceValue
virtual void getUniqueNamespaceValue(XalanDOMString &theValue) const =0
Generate a random namespace prefix guaranteed to be unique.
PrefixResolver
This class defines an interface for classes that resolve namespace prefixes to their URIs.
Definition: PrefixResolver.hpp:40
StylesheetExecutionContext::collationCompare
virtual int collationCompare(const XalanDOMString &theLHS, const XalanDOMString &theRHS, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)=0
Compare two strings using the collation of the current locale.
StylesheetExecutionContext::beginParams
virtual void beginParams()=0
Initiate context to accept a new set of parameters.
StylesheetExecutionContext::createPrintWriter
virtual PrintWriter * createPrintWriter(XalanOutputStream *theTextOutputStream)=0
Create a PrintWriter for the provided stream.
StylesheetExecutionContext::pushExecuteIf
virtual void pushExecuteIf(bool executeIf)=0
Set flag that determines if the if test was true.
StylesheetExecutionContext::popExecuteIf
virtual bool popExecuteIf()=0
Pop the flag that determines if the if test was true.
XObject
Class to hold XPath return types.
Definition: XObject.hpp:64
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
StylesheetExecutionContext::setPrefixResolver
virtual void setPrefixResolver(const PrefixResolver *thePrefixResolver)=0
Change the resolver for namespaces.
StylesheetExecutionContext::popElementRecursionStack
virtual const ElemTemplateElement * popElementRecursionStack()=0
Pop an element off the recursion stack.
StylesheetExecutionContext::charactersRaw
virtual void charactersRaw(const XObjectPtr &xobject)=0
Send raw character data from an XObject to the result tree.
StylesheetExecutionContext::getUseAttributeSetIndexes
virtual UseAttributeSetIndexes & getUseAttributeSetIndexes()=0
StylesheetExecutionContext::XPathGuard::release
const XPath * release()
Definition: StylesheetExecutionContext.hpp:555
CountersTable
<meta name="usage" content="internal"> This is a table of counters, keyed by ElemNumber objects,...
Definition: CountersTable.hpp:158
StylesheetExecutionContext::copyNamespaceAttributes
virtual void copyNamespaceAttributes(const XalanNode &src)=0
Add namespace attributes for a node to the list of pending attributes.
StylesheetExecutionContext::eEscapeURLsNo
@ eEscapeURLsNo
Definition: StylesheetExecutionContext.hpp:1274
XalanDocument
Definition: XalanDocument.hpp:37
FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:57
TopLevelArg.hpp
StylesheetExecutionContext::OutputContextPushPop::~OutputContextPushPop
~OutputContextPushPop()
Definition: StylesheetExecutionContext.hpp:410
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
StylesheetExecutionContext::traceSelect
virtual void traceSelect(const ElemTemplateElement &theStylesheetElement, const NodeRefListBase &nl, const XPath *xpath)=0
Compose a diagnostic trace of the current selection.
StylesheetExecutionContext::createPrintWriter
virtual PrintWriter * createPrintWriter(const XalanDOMString &theFileName, const XalanDOMString &theEncoding)=0
Create a PrintWriter.
StylesheetExecutionContext::createUseAttributeSetIndexesOnStack
virtual void createUseAttributeSetIndexesOnStack()=0
StylesheetExecutionContext::characters
virtual void characters(const XalanNode &node)=0
Send character data from a node to the result tree.
XalanDOMString.hpp
XalanDocumentFragment
Definition: XalanDocumentFragment.hpp:33
StylesheetExecutionContext::outputToResultTree
virtual void outputToResultTree(const XObject &xobj, const Locator *locator)=0
Output an object to the result tree by doing the right conversions.
StylesheetExecutionContext::XalanNumberFormatAutoPtr
XalanMemMgrAutoPtr< XalanNumberFormat > XalanNumberFormatAutoPtr
Definition: StylesheetExecutionContext.hpp:1527
StylesheetExecutionContext::fl_size_type
FormatterListener::size_type fl_size_type
Definition: StylesheetExecutionContext.hpp:114
XalanText
Definition: XalanText.hpp:41
StylesheetExecutionContext::popCurrentMode
virtual void popCurrentMode()=0
Pop the current mode.
StylesheetExecutionContext::getVariable
virtual const XObjectPtr getVariable(const XalanQName &name, const Locator *locator=0)=0
Given a name, locate a variable in the current context, and return a pointer to the object.
StylesheetExecutionContext::pushVariable
virtual void pushVariable(const XalanQName &name, const ElemTemplateElement *element, const XalanDOMString &str, XalanNode *contextNode, const PrefixResolver &resolver)=0
Execute an XPath using the provided expression, and push the result as a variable in the context of t...
StylesheetExecutionContext::setStylesheetRoot
virtual void setStylesheetRoot(const StylesheetRoot *theStylesheet)=0
Set root stylesheet for stylesheet.
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
StylesheetExecutionContext::ElementRecursionStackPusher
Class for keeping track of elements pushed on the element recursion stack.
Definition: StylesheetExecutionContext.hpp:1221
StylesheetExecutionContext::getIndent
virtual int getIndent() const =0
Retrieve the current number of spaces to indent.
XALAN_XSLT_EXPORT
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:27
FormatterListener.hpp
StylesheetExecutionContext::XPathGuard::~XPathGuard
~XPathGuard()
Definition: StylesheetExecutionContext.hpp:540
StylesheetExecutionContext::popCurrentNode
virtual void popCurrentNode()=0
Reset the node currently being executed.
XalanNumberFormat
Definition: XalanNumberFormat.hpp:37
StylesheetExecutionContext::createMutableNodeRefList
virtual MutableNodeRefList * createMutableNodeRefList(MemoryManager &theManager) const =0
Create a MutableNodeRefList with the appropriate context.
StylesheetExecutionContext::SetAndRestoreCopyTextNodesOnly::SetAndRestoreCopyTextNodesOnly
SetAndRestoreCopyTextNodesOnly(StylesheetExecutionContext &executionContext, bool fValue)
Definition: StylesheetExecutionContext.hpp:174
StylesheetExecutionContext::SetAndRestoreCopyTextNodesOnly
Definition: StylesheetExecutionContext.hpp:171
StylesheetExecutionContext::formatNumber
virtual void formatNumber(double number, const XalanDOMString &pattern, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)=0
Formats a number according to the specified pattern.
StylesheetExecutionContext::getCurrentStackFrameIndex
virtual int getCurrentStackFrameIndex() const =0
Get the top of the stack frame from where a search for a variable or param should take place.
StylesheetExecutionContext::collationCompare
virtual int collationCompare(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, const XalanDOMChar *theLocale, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)=0
Compare two strings using the collation of the current locale.
StylesheetExecutionContext::eEscapeURLsDefault
@ eEscapeURLsDefault
Definition: StylesheetExecutionContext.hpp:1273
StylesheetExecutionContext::pushXObjectPtr
virtual void pushXObjectPtr(const XObjectPtr &xobjectPtr)=0
XalanElement
Definition: XalanElement.hpp:45
StylesheetExecutionContext::endDocument
virtual void endDocument()=0
Receive notification of the end of a document.
StylesheetExecutionContext::fireSelectEvent
virtual void fireSelectEvent(const SelectionEvent &se)=0
Fire a selection event.
StylesheetExecutionContext::addResultAttribute
virtual void addResultAttribute(const XalanDOMString &aname, const XalanDOMString &value)=0
Add a result attribute to the list of pending attributes.
StylesheetExecutionContext::flushPending
virtual void flushPending()=0
Flush the pending element.
StylesheetExecutionContext::getContextNodeListPosition
virtual size_type getContextNodeListPosition(const XalanNode &contextNode) const =0
StylesheetExecutionContext::getXSLNameSpaceURL
virtual const XalanDOMString & getXSLNameSpaceURL() const =0
Determine the full XSLT Namespace URI.
StylesheetExecutionContext::eOmitMETATag
eOmitMETATag
Enums to determine whether or not run-time omission of the META tag has been set.
Definition: StylesheetExecutionContext.hpp:1303
StylesheetExecutionContext::addResultAttribute
virtual void addResultAttribute(const XalanDOMString &aname, const XalanDOMChar *value)=0
Add a result attribute to the list of pending attributes.
StylesheetExecutionContext::SetAndRestoreCurrentStackFrameIndex::SetAndRestoreCurrentStackFrameIndex
SetAndRestoreCurrentStackFrameIndex(StylesheetExecutionContext &executionContext, int newIndex)
Definition: StylesheetExecutionContext.hpp:921
StylesheetExecutionContext::getResultNamespaceForPrefix
virtual const XalanDOMString * getResultNamespaceForPrefix(const XalanDOMString &thePrefix) const =0
Retrieve the result namespace corresponding to a prefix.
StylesheetExecutionContext::startDocument
virtual void startDocument()=0
Receive notification of the beginning of a document.
StylesheetExecutionContext::createVariable
virtual const XObjectPtr createVariable(const XPath &xpath, XalanNode *contextNode, const PrefixResolver &resolver)=0
Execute the supplied XPath and and create a variable in the current context.
StylesheetExecutionContext::XPathGuard::get
const XPath * get() const
Definition: StylesheetExecutionContext.hpp:549
StylesheetExecutionContext::ElementRecursionStackPusher::ElementRecursionStackPusher
ElementRecursionStackPusher(StylesheetExecutionContext &executionContext, const ElemTemplateElement *element)
Construct an instance of the recursion stack pusher.
Definition: StylesheetExecutionContext.hpp:1230
StylesheetExecutionContext::eOmitMETATagDefault
@ eOmitMETATagDefault
Definition: StylesheetExecutionContext.hpp:1304
StylesheetExecutionContext::createAndPushNodesToTransformList
virtual void createAndPushNodesToTransformList(const NodeRefListBase *nodeList)=0
StylesheetExecutionContext::startElement
virtual void startElement(const XalanDOMChar *name)=0
Receive notification of the beginning of an element.
StylesheetExecutionContext::popProcessCurrentAttribute
virtual bool popProcessCurrentAttribute()=0
Pops the last flag setting that determines if the current attribute should be executed.
StylesheetExecutionContext::createMatchPattern
virtual const XPath * createMatchPattern(const XalanDOMString &str, const PrefixResolver &resolver)=0
Create and initialize an xpath and return it.
StylesheetExecutionContext::findOnElementRecursionStack
virtual bool findOnElementRecursionStack(const ElemTemplateElement *theElement) const =0
Determine if an element is on the recursion stack.
StylesheetExecutionContext::UseAttributeSetIndexes::matchingAttributeSetIndex
size_type matchingAttributeSetIndex
Definition: StylesheetExecutionContext.hpp:1550
StylesheetExecutionContext::pushOnElementRecursionStack
virtual void pushOnElementRecursionStack(const ElemTemplateElement *theElement)=0
Push an element onto the recursion stack.
StylesheetExecutionContext::isPendingResultPrefix
virtual bool isPendingResultPrefix(const XalanDOMString &thePrefix)=0
Determine whether or not a prefix is in use on the pending element or the pending attributes.
StylesheetExecutionContext::getCurrentMode
virtual const XalanQName * getCurrentMode() const =0
Retrieve the current mode.
StylesheetExecutionContext::getPrefixResolver
virtual const PrefixResolver * getPrefixResolver() const =0
Retrieve the resolver for namespaces.
XalanOutputStream
Definition: XalanOutputStream.hpp:50
StylesheetExecutionContext::popSkipElementAttributes
virtual bool popSkipElementAttributes()=0
Pops the last flag setting that determines if an element's attributes should be skipped.
StylesheetExecutionContext::getCopyTextNodesOnly
virtual bool getCopyTextNodesOnly() const =0
If this function returns true, only text nodes can be copied to the result tree.
ProblemListenerBase::eSource
eSource
Definition: ProblemListenerBase.hpp:59
StylesheetExecutionContext::SetAndRestoreCurrentStackFrameIndex::~SetAndRestoreCurrentStackFrameIndex
~SetAndRestoreCurrentStackFrameIndex()
Definition: StylesheetExecutionContext.hpp:930
XPathExecutionContext
Definition: XPathExecutionContext.hpp:80
Stylesheet
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:87
StylesheetExecutionContext::popElementFrame
virtual void popElementFrame()=0
Pop a frame marker for an element.
StylesheetExecutionContext::getInvoker
virtual const ElemTemplateElement * getInvoker() const =0
Get the lastest element that has invoked a non-child element.
StylesheetExecutionContext::releaseAndPopMutableNodeRefList
virtual void releaseAndPopMutableNodeRefList()=0
StylesheetExecutionContext::returnXResultTreeFrag
virtual bool returnXResultTreeFrag(XResultTreeFrag *theXResultTreeFrag)=0
This is a hook that XResultTreeFrag instances (which are reference counted), can notify the owning St...
StylesheetExecutionContext::fireTraceEvent
virtual void fireTraceEvent(const TracerEvent &te)=0
Fire a trace event.
StylesheetExecutionContext::setFormatterListener
virtual void setFormatterListener(FormatterListener *flistener)=0
Set the current formatter listener.
StylesheetExecutionContext::getSourceDocument
virtual XalanDocument * getSourceDocument(const XalanDOMString &theURI) const =0
Get the document associated with the given URI.
StylesheetExecutionContext::XPathGuard::XPathGuard
XPathGuard(StylesheetExecutionContext &context, const XPath *xpath=0)
Definition: StylesheetExecutionContext.hpp:532
SelectionEvent
Definition: SelectionEvent.hpp:48
StylesheetExecutionContext::OutputContextPushPop
Definition: StylesheetExecutionContext.hpp:393
StylesheetExecutionContext::processingInstruction
virtual void processingInstruction(const XalanDOMChar *target, const XalanDOMChar *data)=0
Receive notification of a processing instruction.
StylesheetExecutionContext::setEscapeURLs
virtual void setEscapeURLs(eEscapeURLs value)=0
Set the value for run-time escaping of URLs.
StylesheetExecutionContext::getNodeSetByKey
virtual void getNodeSetByKey(XalanNode *context, const XalanDOMString &name, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist)=0
Given a valid element key, return the corresponding node list.
StylesheetExecutionContext::createPrintWriter
virtual PrintWriter * createPrintWriter(StreamType &theStream)=0
Create a PrintWriter using the provided ostream instance.
StylesheetExecutionContext::popCopyTextNodesOnly
virtual bool popCopyTextNodesOnly()=0
Pop the last flag setting that determines if only text nodes can be copied to the result tree.
StylesheetExecutionContext::getNodeSorter
virtual NodeSorter * getNodeSorter()=0
Get node sorter instance.
StylesheetExecutionContext::getNamespaceForPrefix
virtual const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix) const =0
Retrieve the URI corresponding to a namespace prefix.
StylesheetExecutionContext::getXalanXSLNameSpaceURL
virtual const XalanDOMString & getXalanXSLNameSpaceURL() const =0
Special Xalan namespace for built-in extensions.
StylesheetExecutionContext::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)=0
Create a new FormatterToHTML instance.
StylesheetExecutionContext::getCurrentNode
virtual XalanNode * getCurrentNode() const =0
Retrieve the node currently being executed.
StylesheetExecutionContext::problem
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
StylesheetExecutionContext::pushVariable
virtual void pushVariable(const XalanQName &name, const ElemVariable *var, const ElemTemplateElement *element)=0
Push a named variable onto the processor variable stack The variable will be evaluated when first ref...
XObjectFactory
This class handles the creation of XObjects and manages their lifetime.
Definition: XObjectFactory.hpp:54
StylesheetExecutionContext::outputResultTreeFragment
virtual void outputResultTreeFragment(const XObject &theTree, const Locator *locator)=0
Given a result tree fragment, walk the tree and output it to the result stream.
StylesheetExecutionContext::pushVariable
virtual void pushVariable(const XalanQName &name, const ElemTemplateElement *element, const XPath &xpath, XalanNode *contextNode, const PrefixResolver &resolver)=0
Execute the supplied XPath and push the result as a variable in the current context.
StylesheetExecutionContext::getLastCachedString
virtual XalanDOMString & getLastCachedString()=0
Gets the last string that was cached on the stack.
StylesheetExecutionContext::replacePendingAttribute
virtual void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)=0
Replace the contents of a pending attribute.
StylesheetExecutionContext::collationCompare
virtual int collationCompare(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanCollationServices::eCaseOrder theCaseOrder=XalanCollationServices::eDefault)=0
Compare two strings using the collation of the current locale.
FormatterListener::size_type
XalanSize_t size_type
Definition: FormatterListener.hpp:63
StylesheetExecutionContext::popUseAttributeSetIndexesFromStack
virtual void popUseAttributeSetIndexesFromStack()=0
StylesheetExecutionContext::eDummy
eDummy
Definition: StylesheetExecutionContext.hpp:1263
StylesheetExecutionContext::pushProcessCurrentAttribute
virtual void pushProcessCurrentAttribute(bool processAttribute)=0
Set the flag that determines if the current attribute should be executed.
StylesheetExecutionContext::elementAvailable
virtual bool elementAvailable(const XalanQName &theQName) const =0
Determine if an external element is available.
StylesheetExecutionContext::ElementRecursionStackPusher::~ElementRecursionStackPusher
~ElementRecursionStackPusher()
Definition: StylesheetExecutionContext.hpp:1238
XalanCollationServices.hpp
StylesheetExecutionContext::getRootDocument
virtual XalanNode * getRootDocument() const =0
Retrieve root document for stylesheet.
XalanVector
Definition: XalanVector.hpp:59
XalanDOMString
Definition: XalanDOMString.hpp:46
StylesheetExecutionContext::createPrintWriter
virtual PrintWriter * createPrintWriter(FILE *theStream)=0
Create a PrintWriter using the provided FILE instance.
StylesheetExecutionContext::charactersRaw
virtual void charactersRaw(const XalanNode &node)=0
Send raw character data from a node to the result tree.
StylesheetExecutionContext::XPathGuard::reset
void reset(const XPath *xpath)
Definition: StylesheetExecutionContext.hpp:565
StylesheetExecutionContext::tl_size_type
XalanSize_t tl_size_type
Definition: StylesheetExecutionContext.hpp:112
StylesheetExecutionContext::isElementPending
virtual bool isElementPending() const =0
See if there is an element pending.
StylesheetExecutionContext::UseAttributeSetIndexes::attributeSetNameIndex
size_type attributeSetNameIndex
Definition: StylesheetExecutionContext.hpp:1549
StylesheetExecutionContext::eOmitMETATagNo
@ eOmitMETATagNo
Definition: StylesheetExecutionContext.hpp:1305
XPath
Definition: XPath.hpp:65
StylesheetExecutionContext::fireGenerateEvent
virtual void fireGenerateEvent(const GenerateEvent &ge)=0
Fire a generate event.
StylesheetExecutionContext::setOmitMETATag
virtual void setOmitMETATag(eOmitMETATag value)=0
Get the value for run-time omission of URLs.
StylesheetExecutionContext::shouldStripSourceNode
virtual bool shouldStripSourceNode(const XalanText &node)=0
Determine if a text node should be stripped from the source tree, as if it weren't there.
StylesheetExecutionContext::borrowMutableNodeRefList
virtual MutableNodeRefList * borrowMutableNodeRefList()=0
Borrow a cached MutableNodeRefList instance.
XPathExecutionContext.hpp
XalanMemMgrs::getDummyMemMgr
static MemoryManager & getDummyMemMgr()
ElemTemplateElement
Definition: ElemTemplateElement.hpp:77
XalanMemMgrAutoPtr
Definition: XalanMemMgrAutoPtr.hpp:47
StylesheetExecutionContext::pushSkipElementAttributes
virtual void pushSkipElementAttributes(bool skipAttributes)=0
Set the flag that determines if an element's attributes should be skipped.
StylesheetExecutionContext::getContextNodeListLength
virtual size_type getContextNodeListLength() const =0
XObjectPtr
Class to hold XObjectPtr return types.
Definition: XObject.hpp:884
StylesheetExecutionContext::pushContextNodeList
virtual void pushContextNodeList(const NodeRefListBase &theList)=0
Push the node list for current context.
NodeRefListBase
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:45
XalanCollationServices::eDefault
@ eDefault
Definition: XalanCollationServices.hpp:40
StylesheetExecutionContext::characters
virtual void characters(const XalanDOMChar *ch, fl_size_type start, fl_size_type length)=0
Receive notification of character data.
StylesheetExecutionContext::pushOutputContext
virtual void pushOutputContext(FormatterListener *flistener=0)=0
ElemTemplate
Definition: ElemTemplate.hpp:44
StylesheetExecutionContext::pushTopLevelVariables
virtual void pushTopLevelVariables(const ParamVectorType &topLevelParams)=0
Set a list of top level variables in the specified execution context stylesheet.
StylesheetExecutionContext::eEscapeURLs
eEscapeURLs
Enums to determine whether or not run-time escaping of URLs has been set.
Definition: StylesheetExecutionContext.hpp:1272
StylesheetExecutionContext::cloneToResultTree
virtual void cloneToResultTree(const XalanNode &node, const Locator *locator)=0
Clone a node to the result tree.
StylesheetExecutionContext::endParams
virtual void endParams()=0
Indicate parameter set is complete.
StylesheetExecutionContext::getUnparsedEntityURI
virtual const XalanDOMString & getUnparsedEntityURI(const XalanDOMString &theName, const XalanDocument &theDocument) const =0
The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in t...
AttributeListImpl.hpp
StylesheetExecutionContext::problem
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
StylesheetExecutionContext::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()))=0
Create a new FormatterToXML instance.
StylesheetExecutionContext::popCurrentStackFrameIndex
virtual void popCurrentStackFrameIndex()=0
Pop the last stack frame index setting.
FormatterToText
This class takes SAX events (in addition to some extra events that SAX doesn't handle yet) and produc...
Definition: FormatterToText.hpp:50
StylesheetExecutionContext::createAndPushMutableNodeRefList
virtual MutableNodeRefList & createAndPushMutableNodeRefList()=0
StylesheetExecutionContext::characters
virtual void characters(const XObjectPtr &xobject)=0
Send character data from an XObject to the result tree.
StylesheetExecutionContext::StylesheetExecutionContext
StylesheetExecutionContext(MemoryManager &theMemoryManager, XObjectFactory *theXObjectFactory=0)
XalanQName
Class to represent a qualified name.
Definition: XalanQName.hpp:71
StylesheetExecutionContext::clearTopLevelParams
virtual void clearTopLevelParams()=0
Reset the vector of top level parameters.
StylesheetExecutionContext::beginCreateXResultTreeFrag
virtual void beginCreateXResultTreeFrag(XalanNode *sourceNode)=0
Initiate creation of a result tree fragment.
StylesheetExecutionContext::~StylesheetExecutionContext
virtual ~StylesheetExecutionContext()
StylesheetRoot
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
Definition: StylesheetRoot.hpp:64
StylesheetExecutionContext::isNodeAfter
virtual bool isNodeAfter(const XalanNode &node1, const XalanNode &node2) const =0
Determine if a node is after another node, in document order.
StylesheetExecutionContext::popXObjectPtr
virtual void popXObjectPtr()=0
StylesheetExecutionContext::XPathGuard
Definition: StylesheetExecutionContext.hpp:529
XSLTDefinitions.hpp
StylesheetExecutionContext::parseXML
virtual XalanDocument * parseXML(MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0) const =0
Provides support for XML parsing service.
StylesheetExecutionContext::getAndPopCachedString
virtual XalanDOMString & getAndPopCachedString()=0
Gets the last string to be cached on the stack and pops it from the stack.
ElemVariable
Definition: ElemVariable.hpp:48
StylesheetExecutionContext::StreamType
std::ostream StreamType
Definition: StylesheetExecutionContext.hpp:119
XResultTreeFrag
Definition: XResultTreeFrag.hpp:51
StylesheetExecutionContext
Definition: StylesheetExecutionContext.hpp:109
StylesheetExecutionContext::functionAvailable
virtual bool functionAvailable(const XalanDOMString &theName, const Locator *locator) const =0
Determine if a function is available.
StylesheetExecutionContext::getParamVariable
virtual const XObjectPtr getParamVariable(const XalanQName &theName)=0
Given a name, return a string representing the value, but don't look in the global space.
StylesheetExecutionContext::functionAvailable
virtual bool functionAvailable(const XalanQName &theQName) const =0
Determine if a function is available.
StylesheetExecutionContext::getNextNodeToTransform
virtual XalanNode * getNextNodeToTransform()=0
StylesheetExecutionContext::pushInvoker
virtual void pushInvoker(const ElemTemplateElement *invoker)=0
Push the element that will invoke non children elements (i.e templates, attribute-sets)
StylesheetExecutionContext::OutputContextPushPop::OutputContextPushPop
OutputContextPushPop(StylesheetExecutionContext &theExecutionContext, FormatterListener *theNewListener=0)
Construct an object to push and pop the current output context.
Definition: StylesheetExecutionContext.hpp:402
StylesheetExecutionContext::endCreateXResultTreeFrag
virtual const XObjectPtr endCreateXResultTreeFrag()=0
Indicate sthe completion of result tree fragment.
StylesheetExecutionContext::setIndent
virtual void setIndent(int indentAmount)=0
Set the current number of spaces to indent.
StylesheetExecutionContext::reset
virtual void reset()=0
Reset the instance.
StylesheetExecutionContext::popCurrentTemplate
virtual void popCurrentTemplate()=0
Writer
Definition: Writer.hpp:45
StylesheetExecutionContext::returnMutableNodeRefList
virtual bool returnMutableNodeRefList(MutableNodeRefList *theList)=0
Return a previously borrowed MutableNodeRefList instance.
XalanNode
Definition: XalanNode.hpp:39
StylesheetExecutionContext::getGlobalStackFrameIndex
virtual int getGlobalStackFrameIndex() const =0
Get the top of the global stack frame.
StylesheetExecutionContext::charactersRaw
virtual void charactersRaw(const XalanDOMChar *ch, fl_size_type start, fl_size_type length)=0
Receive notification of character data.
StylesheetExecutionContext::extFunction
virtual const XObjectPtr extFunction(const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const Locator *locator)=0
Handle an extension function.
MutableNodeRefList
Local implementation of MutableNodeRefList.
Definition: MutableNodeRefList.hpp:47
StylesheetExecutionContext::getNodeSetByKey
virtual void getNodeSetByKey(XalanNode *context, const XalanQName &qname, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist)=0
Given a valid element key, return the corresponding node list.
StylesheetExecutionContext::findURIFromDoc
virtual const XalanDOMString & findURIFromDoc(const XalanDocument *owner) const =0
Given a DOM Document, tell what URI was used to parse it.
StylesheetExecutionContext::pushCurrentTemplate
virtual void pushCurrentTemplate(const ElemTemplate *theTemplate)=0
Set the current template.
StylesheetExecutionContext::pushVariable
virtual void pushVariable(const XalanQName &name, const XObjectPtr val, const ElemTemplateElement *element)=0
Push a named variable onto the variables stack.
StylesheetExecutionContext::popOutputContext
virtual void popOutputContext()=0
StylesheetExecutionContext::popInvoker
virtual void popInvoker()=0
Pop the element that invoked non children elements.
StylesheetExecutionContext::getEscapeURLs
virtual eEscapeURLs getEscapeURLs() const =0
Get the value for run-time escaping of URLs.
StylesheetExecutionContext::popContextMarker
virtual void popContextMarker()=0
Pop the current context from the current context stack.
PrintWriter
Definition: PrintWriter.hpp:38
StylesheetExecutionContext::pushContextMarker
virtual void pushContextMarker()=0
Push a context marker onto the stack to let us know when to stop searching for a var.
StylesheetExecutionContext::getCurrentTemplate
virtual const ElemTemplate * getCurrentTemplate() const =0
Retrieve the current template.
StylesheetExecutionContext::setSourceDocument
virtual void setSourceDocument(const XalanDOMString &theURI, XalanDocument *theDocument)=0
Associate a document with a given URI.
StylesheetExecutionContext::endFormatToText
virtual void endFormatToText()=0
Indicates the completion of the result string.
StylesheetExecutionContext::getContextNodeList
virtual const NodeRefListBase & getContextNodeList() const =0
Get the node list for current context.
StylesheetExecutionContext::elementAvailable
virtual bool elementAvailable(const XalanDOMString &theName, const Locator *locator) const =0
Determine if an external element is available by resolving a string to a QName.
StylesheetExecutionContext::UseAttributeSetIndexes
Definition: StylesheetExecutionContext.hpp:1544
StylesheetExecutionContext::endElement
virtual void endElement(const XalanDOMChar *name)=0
Receive notification of the end of an element.
StylesheetExecutionContext::createFormatterToText
virtual FormatterListener * createFormatterToText(Writer &writer, const XalanDOMString &encoding)=0
FormatterToText instance constructor.
StylesheetExecutionContext::pushCopyTextNodesOnly
virtual void pushCopyTextNodesOnly(bool copyTextNodesOnly)=0
Set the flag that determines if only text nodes can be copied to the result tree.
StylesheetExecutionContext::SetAndRestoreCopyTextNodesOnly::~SetAndRestoreCopyTextNodesOnly
~SetAndRestoreCopyTextNodesOnly()
Definition: StylesheetExecutionContext.hpp:182
StylesheetExecutionContext::pushCurrentNode
virtual void pushCurrentNode(XalanNode *theCurrentNode)=0
Change the node currently being executed.
StylesheetExecutionContext::popNodesToTransformList
virtual void popNodesToTransformList()=0
StylesheetExecutionContext::getTraceListeners
virtual tl_size_type getTraceListeners() const =0
Determine the number of trace listeners.
StylesheetExecutionContext::getTraceSelects
virtual bool getTraceSelects() const =0
If this is set to true, simple traces of template calls are made.
XalanMemMgrAutoPtr.hpp
StylesheetExecutionContext::getResultPrefixForNamespace
virtual const XalanDOMString * getResultPrefixForNamespace(const XalanDOMString &theNamespace) const =0
Retrieve the result prefix corresponding to a namespace.
StylesheetExecutionContext::createXalanNumberFormat
virtual XalanNumberFormatAutoPtr createXalanNumberFormat()=0
Create a new XalanNumberFormat instance.
StylesheetExecutionContext::getCachedString
virtual XalanDOMString & getCachedString()=0
Get a cached string for temporary use.

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