Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XSLTEngineImpl.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(XALAN_XSLTENGINEIMPL_HEADER_GUARD)
19 #define XALAN_XSLTENGINEIMPL_HEADER_GUARD
20 
21 
22 
23 // Base include file. Must be first.
24 #include "XSLTDefinitions.hpp"
25 
26 
27 
28 // Base class
29 #include "XSLTProcessor.hpp"
30 
31 
32 
33 
34 // Standard library headers
35 #include <cassert>
36 
37 
38 
40 
41 
42 
43 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
45 #endif
46 
47 
48 
51 
52 
53 
57 
58 
59 
61 
62 
63 
65 
66 
67 
69 
70 
71 
72 #include "OutputContextStack.hpp"
77 #include "XalanParamHolder.hpp"
78 
79 
80 
81 XALAN_DECLARE_XERCES_CLASS(InputSource)
82 XALAN_DECLARE_XERCES_CLASS(DocumentHandler)
83 
84 
85 
86 XALAN_CPP_NAMESPACE_BEGIN
87 
88 
89 
90 typedef XERCES_CPP_NAMESPACE_QUALIFIER InputSource InputSourceType;
91 typedef XERCES_CPP_NAMESPACE_QUALIFIER DocumentHandler DocumentHandlerType;
92 
93 XALAN_USING_XERCES(InputSource)
94 XALAN_USING_XERCES(DocumentHandler)
95 
96 
97 
98 // Forward declarations...
99 class DOMSupport;
100 class GenerateEvent;
101 class PrintWriter;
103 class StylesheetRoot;
104 class XalanAttr;
106 class XalanText;
107 class XMLParserLiaison;
108 class XObject;
109 class XPathEnvSupport;
110 class XPathFactory;
111 class XPathProcessor;
112 class XSLTResultTarget;
113 
114 
115 
116 /**
117  * It's the responsibility of the XSLTEngineImpl class, collaborating with the
118  * XML parser liaison, the DOM, and the XPath engine, to transform a source
119  * tree of nodes into a result tree according to instructions and templates
120  * specified by a stylesheet tree. The process method is the primary
121  * public entry points.
122  *
123  *
124  * If you reuse the processor instance, you should call reset() between calls.
125  *
126  */
127 
129 {
130 public:
131 
133  {
134  bool
136  const XalanDOMString* theLHS,
137  const XalanDOMString* theRHS) const
138  {
139  if (theLHS == 0 && theRHS != 0)
140  {
141  return true;
142  }
143  else if (theRHS == 0)
144  {
145  return false;
146  }
147  else
148  {
149  return theLHS->compare(*theRHS) < 0 ? true : false;
150  }
151  }
152  };
153 
157 
159 
161  {
163  m_string(theString)
164  {
165  }
166 
167  bool
168  operator()(const XalanDOMString* theString) const
169  {
170  assert(theString != 0);
171 
172  return *theString == m_string;
173  }
174 
175  private:
176 
177  const XalanDOMString& m_string;
178  };
179 
185 
187 
188  // Public members
189  //---------------------------------------------------------------------
190 
191  /**
192  * Construct an XSL processor that can call back to a XML processor, so it
193  * can handle included files, and the like. You must create a new instance
194  * of the XSLTEngineImpl class each time you run a transformation.
195  *
196  * @param XMLParserLiaison liaison to an object that can help with a
197  * specific parser implementation
198  * @param xpathEnvSupport An XPathEnvSupport instance
199  * @param domSupport A DOMSupport instance for the DOM being used
200  * @param xobjectFactory object responsible for XObject objects
201  * @param xpathFactory object responsible for XPath objects
202  */
204  MemoryManager& theManager,
205  XMLParserLiaison& parserLiaison,
206  XPathEnvSupport& xpathEnvSupport,
207  DOMSupport& domSupport,
208  XObjectFactory& xobjectFactory,
209  XPathFactory& xpathFactory);
210 
211  virtual
212  ~XSLTEngineImpl();
213 
214  MemoryManager&
216  {
217  return m_xpathConstructionContext.getMemoryManager();
218  }
219 
220  MemoryManager&
222  {
223  return m_xpathConstructionContext.getMemoryManager();
224  }
225 
226  /**
227  * Perform initialization of statics -- must be called before any
228  * processing occurs. See class XSLTInit.
229  */
230  static void
231  initialize(MemoryManager& theManager);
232 
233  /**
234  * Perform termination of statics. See class XSLTInit.
235  */
236  static void
237  terminate();
238 
239  // These methods are inherited from XSLTProcessor ...
240 
241  virtual void
242  problem(
243  eSource source,
244  eClassification classification,
245  const XalanDOMString& msg,
246  const Locator* locator,
247  const XalanNode* sourceNode);
248 
249  virtual void
250  problem(
251  eSource source,
252  eClassification classification,
253  const XalanDOMString& msg,
254  const XalanNode* sourceNode);
255 
256  virtual void
257  process(
258  const XSLTInputSource& inputSource,
259  const XSLTInputSource& stylesheetSource,
260  XSLTResultTarget& outputTarget,
261  StylesheetConstructionContext& constructionContext,
262  StylesheetExecutionContext& executionContext);
263 
264  virtual void
265  process(
266  const XSLTInputSource& inputSource,
267  XSLTResultTarget& outputTarget,
268  StylesheetExecutionContext& executionContext);
269 
270  virtual StylesheetRoot*
271  processStylesheet(
272  const XSLTInputSource& stylesheetSource,
273  StylesheetConstructionContext& constructionContext);
274 
275  virtual StylesheetRoot*
276  processStylesheet(
277  const XalanDOMString& xsldocURLString,
278  StylesheetConstructionContext& constructionContext);
279 
280  virtual XalanNode*
281  getSourceTreeFromInput(const XSLTInputSource& inputSource);
282 
283  virtual void
284  resolveTopLevelParams(StylesheetExecutionContext& executionContext);
285 
286  virtual XMLParserLiaison&
287  getXMLParserLiaison() const;
288 
289  virtual void
290  getUniqueNamespaceValue(XalanDOMString& theValue);
291 
292  virtual void
293  setStylesheetParam(
294  const XalanDOMString& key,
295  const XalanDOMString& expression);
296 
297  virtual void
298  setStylesheetParam(
299  const XalanDOMString& key,
300  XObjectPtr value);
301 
302  virtual void
303  clearStylesheetParams();
304 
305  virtual FormatterListener*
306  getFormatterListener() const;
307 
308  virtual void
309  setFormatterListener(FormatterListener* flistener);
310 
311  // Trace-related functions...
312 
313  virtual size_type
314  getTraceListeners() const;
315 
316  virtual void
317  addTraceListener(TraceListener* tl);
318 
319  virtual void
320  removeTraceListener(TraceListener* tl);
321 
322  virtual void
323  fireGenerateEvent(const GenerateEvent& ge);
324 
325  virtual void
326  fireTraceEvent(const TracerEvent& te);
327 
328  virtual void
329  fireSelectEvent(const SelectionEvent& se);
330 
331  virtual bool
332  getTraceSelects() const;
333 
334  virtual void
335  setTraceSelects(bool b);
336 
337  void
338  traceSelect(
339  StylesheetExecutionContext& executionContext,
340  const ElemTemplateElement& theTemplate,
341  const NodeRefListBase& nl,
342  const XPath* xpath) const;
343 
344  virtual void
345  setQuietConflictWarnings(bool b);
346 
347  virtual void
348  setDiagnosticsOutput(PrintWriter* pw);
349 
350 
351  // Inherited from PrefixResolver...
352 
353  /**
354  * Retrieve a namespace corresponding to a prefix. This assumes that
355  * the PrevixResolver hold's its own namespace context, or is a namespace
356  * context itself.
357  *
358  * @param prefix Prefix to resolve
359  * @return namespace that prefix resolves to, or null if prefix is not found
360  */
361  virtual const XalanDOMString*
362  getNamespaceForPrefix(const XalanDOMString& prefix) const;
363 
364  /**
365  * Retrieve the base URI for the resolver.
366  *
367  * @return URI string
368  */
369  virtual const XalanDOMString&
370  getURI() const;
371 
372  /**
373  * Read in the XML file, either producing a Document or calling SAX events,
374  * and register the document in a table. If the document has already been
375  * read in, it will not be reparsed.
376  *
377  * @param urlString location of the XML
378  * @param docHandler pointer to SAX event handler
379  * @param docToRegister if using a SAX event handler, the object to register in the source docs table.
380  * @return document object, which represents the parsed XML
381  * @exception SAXException
382  */
384  parseXML(
385  const XalanDOMString& urlString,
386  DocumentHandler* docHandler,
387  XalanDocument* docToRegister,
388  ErrorHandler* theErrorHandler = 0);
389 
390  /**
391  * Read in the XML file, either producing a Document or calling SAX events,
392  * and register the document in a table. If the document has already been
393  * read in, it will not be reparsed.
394  *
395  * @param inputSource location of the XML
396  * @param docHandler pointer to SAX event handler
397  * @param docToRegister if using a SAX event handler, the object to register in the source docs table.
398  * @return document object, which represents the parsed XML
399  * @exception SAXException
400  */
402  parseXML(
403  const InputSource& inputSource,
404  DocumentHandler* docHandler,
405  XalanDocument* docToRegister,
406  ErrorHandler* theErrorHandler = 0);
407 
408  /**
409  * Reset the state of the XSL processor by reading in a new XSL stylesheet
410  * from a processing instruction.
411  *
412  * @param xslURLString valid URI to an XSL stylesheet
413  * @param fragBase base of tree if URI represents document
414  * fragment
415  * @param xmlBaseIdent base identifier for stylesheet URI
416  * @param isRoot true if stylesheet is root of tree
417  * @param constructionContext context for construction of object
418  * @return pointer to stylesheet
419  */
420  Stylesheet*
421  getStylesheetFromPIURL(
422  const XalanDOMString& xslURLString,
423  XalanNode& fragBase,
424  const XalanDOMString& xmlBaseIdent,
425  bool isRoot,
426  StylesheetConstructionContext& constructionContext);
427 
428  /**
429  * Flush the pending element.
430  */
431  void
432  flushPending();
433 
434  /**
435  * Add a namespace declaration to the namespace stack
436  *
437  * @param prefix namespace prefix
438  * @param namespaceVal value of namespace
439  */
440  void
442  const XalanDOMString& prefix,
443  const XalanDOMString& namespaceVal)
444  {
445  addResultNamespaceDecl(
446  prefix,
447  namespaceVal.c_str(),
448  namespaceVal.length());
449  }
450 
451  /**
452  * Add a namespace declaration to the namespace stack
453  *
454  * @param prefix namespace prefix
455  * @param namespaceVal value of namespace
456  * @param len length of namespace
457  */
458  void
460  const XalanDOMString& prefix,
461  const XalanDOMChar* namespaceVal,
462  size_type len)
463  {
464  m_resultNamespacesStack.addDeclaration(
465  prefix,
466  namespaceVal,
467  len);
468  }
469 
470  /**
471  * Add attribute to attribute list, and if it is a namespace, add it to the
472  * namespaces stack.
473  *
474  * @param attList attribute list added to
475  * @param aname name of attribute
476  * @param value value of attribute
477  * @param fromCopy true if the attribute is being copied from the source tree
478  * @param locator The Locator for reporting errors.
479  */
480  void
482  AttributeListImpl& attList,
483  const XalanDOMString& aname,
484  const XalanDOMString& value,
485  bool fromCopy = false,
486  const Locator* locator = 0)
487  {
488  addResultAttribute(
489  attList,
490  aname,
491  value.c_str(),
492  fromCopy,
493  locator);
494  }
495 
496  /**
497  * Add attribute to attribute list, and if it is a namespace, add it to the
498  * namespaces stack.
499  *
500  * @param attList attribute list added to
501  * @param aname name of attribute
502  * @param value value of attribute
503  * @param fromCopy true if the attribute is being copied from the source tree
504  * @param locator The Locator for reporting errors.
505  */
506  void
508  AttributeListImpl& attList,
509  const XalanDOMString& aname,
510  const XalanDOMChar* value,
511  bool fromCopy = false,
512  const Locator* locator = 0)
513  {
514  addResultAttribute(
515  attList,
516  aname,
517  value,
518  length(value),
519  fromCopy,
520  locator);
521  }
522 
523  /**
524  * Add attribute to attribute list, and if it is a namespace, add it to the
525  * namespaces stack.
526  *
527  * @param attList attribute list added to
528  * @param aname name of attribute
529  * @param value value of attribute
530  * @param theLength The length of the value
531  * @param fromCopy true if the attribute is being copied from the source tree
532  * @param locator The Locator for reporting errors.
533  */
534  void
535  addResultAttribute(
536  AttributeListImpl& attList,
537  const XalanDOMString& aname,
538  const XalanDOMChar* value,
539  size_type theLength,
540  bool fromCopy = false,
541  const Locator* locator = 0);
542 
543  /**
544  * Add attribute to pending attributes list, and if it is a namespace, add
545  * it to the namespaces stack.
546  *
547  * @param aname name of attribute
548  * @param value value of attribute
549  * @param fromCopy true if the attribute is being copied from the source tree
550  * @param locator The Locator for reporting errors.
551  */
552  void
554  const XalanDOMString& aname,
555  const XalanDOMChar* value,
556  bool fromCopy = false,
557  const Locator* locator = 0)
558  {
559  assert(m_outputContextStack.empty() == false);
560 
561  addResultAttribute(
562  getPendingAttributesImpl(),
563  aname,
564  value,
565  fromCopy,
566  locator);
567  }
568 
569  /**
570  * Add attribute to pending attributes list, and if it is a namespace, add
571  * it to the namespaces stack.
572  *
573  * @param aname name of attribute
574  * @param value value of attribute
575  * @param fromCopy true if the attribute is being copied from the source tree
576  * @param locator The Locator for reporting errors.
577  */
578  void
580  const XalanDOMString& aname,
581  const XalanDOMString& value,
582  bool fromCopy = false,
583  const Locator* locator = 0)
584  {
585  assert(m_outputContextStack.empty() == false);
586 
587  addResultAttribute(
588  getPendingAttributesImpl(),
589  aname,
590  value,
591  fromCopy,
592  locator);
593  }
594 
595  /**
596  * Report an error copying a duplicate namespace node.
597  *
598  * @param theName The name of the node.
599  */
600  void
601  reportDuplicateNamespaceNodeError(
602  const XalanDOMString& theName,
603  const Locator* locator);
604 
605  void
606  setDocumentLocator(const Locator* locator);
607 
608  void
609  startDocument();
610 
611  void
612  endDocument();
613 
614  void
615  startElement(
616  const XalanDOMChar* name,
617  AttributeListType& atts);
618 
619  void
620  endElement(const XalanDOMChar* name);
621 
622  void
623  characters (
624  const XalanDOMChar* ch,
625  size_type length);
626 
627  void
628  ignorableWhitespace(
629  const XalanDOMChar* ch,
630  size_type length);
631 
632  void
633  processingInstruction(
634  const XalanDOMChar* target,
635  const XalanDOMChar* data);
636 
637  void
638  resetDocument();
639 
640  /**
641  * Receive notification of character data.
642  *
643  * @param ch pointer to characters from the XML document
644  * @param start startng offset in 'ch' array
645  * @param length number of characters to read from the array
646  */
647  void
648  characters(
649  const XalanDOMChar* ch,
650  size_type start,
651  size_type length);
652 
653  /**
654  * Send character data from the node to the result tree.
655  *
656  * @param node The node to send.
657  */
658  void
659  characters(const XalanNode& node);
660 
661  /**
662  * Send character data from an XObject to the result tree.
663  *
664  * @param node The xobject to send.
665  */
666  void
667  characters(const XObjectPtr& xobject);
668 
669  /**
670  * Receive notification of the beginning of an element with an empty
671  * attribute list
672  *
673  * @param name element type name
674  */
675  void
676  startElement(const XalanDOMChar* name);
677 
678  /**
679  * Receive notification of character data. If available, when the
680  * disable-output-escaping attribute is used, output raw text without
681  * escaping.
682  *
683  * @param ch pointer to characters from the XML document
684  * @param start start position in the array
685  * @param length number of characters to read from the array
686  */
687  void
688  charactersRaw(
689  const XalanDOMChar* ch,
690  size_type start,
691  size_type length);
692 
693  /**
694  * Send raw character data from the node to the result tree.
695  *
696  * @param node The node to send.
697  */
698  void
699  charactersRaw(const XalanNode& node);
700 
701  /**
702  * Send raw character data from an XObject to the result tree.
703  *
704  * @param node The xobject to send.
705  */
706  void
707  charactersRaw(const XObjectPtr& xobject);
708 
709  /**
710  * Called when a Comment is to be constructed.
711  *
712  * @param data pointer to comment data
713  */
714  void
715  comment(const XalanDOMChar* data);
716 
717  /**
718  * Receive notification of a entityReference.
719  *
720  * @param data pointer to characters from the XML document
721  * @exception SAXException
722  */
723  void
724  entityReference(const XalanDOMChar* data);
725 
726  /**
727  * Receive notification of cdata.
728  *
729  * @param ch pointer to characters from the XML document
730  * @param start start position in the array
731  * @param length number of characters to read from the array
732  */
733  void
734  cdata(
735  const XalanDOMChar* ch,
736  size_type start,
737  size_type length);
738 
739  /**
740  * Clone a node to the result tree
741  *
742  * @param node node to clone
743  * @param cloneTextNodesOnly if true, only text nodes will be cloned
744  * @param locator the Locator for the event, if any.
745  */
746  void
747  cloneToResultTree(
748  const XalanNode& node,
749  bool cloneTextNodesOnly,
750  const Locator* locator);
751 
752  /**
753  * Clone a node to the result tree
754  *
755  * @param node node to clone
756  * @param nodeType the type of the node
757  * @param overrideStrip false if white space stripping should be done
758  * @param shouldCloneAttributes true if attributes should be cloned
759  * @param cloneTextNodesOnly if true, only text nodes will be cloned
760  * @param locator the Locator for the event, if any.
761  */
762  void
763  cloneToResultTree(
764  const XalanNode& node,
765  XalanNode::NodeType nodeType,
766  bool overrideStrip,
767  bool shouldCloneAttributes,
768  bool cloneTextNodesOnly,
769  const Locator* locator);
770 
771  /**
772  * Output an object to the result tree by doing the right conversions.
773  *
774  * @param value the XObject to output
775  * @param outputTextNodesOnly if true, only text nodes will be copied
776  * @param locator the Locator for the event, if any.
777  */
778  void
779  outputToResultTree(
780  const XObject& value,
781  bool outputTextNodesOnly,
782  const Locator* locator);
783 
784  /**
785  * Given a result tree fragment, walk the tree and output it to the result
786  * stream.
787  *
788  * @param theTree result tree fragment
789  * @param outputTextNodesOnly if true, only text nodes will be copied
790  * @param locator the Locator for the event, if any.
791  */
792  void
794  const XObject& theTree,
795  bool outputTextNodesOnly,
796  const Locator* locator)
797  {
798  outputResultTreeFragment(
799  theTree.rtree(),
800  outputTextNodesOnly,
801  locator);
802  }
803 
804  /**
805  * Given a result tree fragment, walk the tree and output it to the result
806  * stream.
807  *
808  * @param theTree result tree fragment
809  * @param outputTextNodesOnly if true, only text nodes will be copied
810  * @param locator the Locator for the event, if any.
811  */
812  void
813  outputResultTreeFragment(
814  const XalanDocumentFragment& theTree,
815  bool outputTextNodesOnly,
816  const Locator* locator);
817 
818  /**
819  * Retrieve the root stylesheet.
820  *
821  * @return pointer to root stylesheet
822  */
823  virtual const StylesheetRoot*
824  getStylesheetRoot() const;
825 
826  /**
827  * Set the root stylesheet.
828  *
829  * @param theStylesheet pointer to new root stylesheet
830  */
831  virtual void
832  setStylesheetRoot(const StylesheetRoot* theStylesheet);
833 
834  /**
835  * Set the execution context.
836  *
837  * @param theExecutionContext pointer to new execution context.
838  */
839  virtual void
840  setExecutionContext(StylesheetExecutionContext* theExecutionContext);
841 
842  /**
843  * Retrieve the URI for the current XSL namespace, for example,
844  * "http://www.w3.org/1999/XSL/Transform"
845  *
846  * @return URI string
847  */
848  static const XalanDOMString&
850  {
851  return s_XSLNameSpaceURL;
852  }
853 
854  /**
855  * Special Xalan namespace for built-in extensions.
856  *
857  * @return Xalan namespace for extensions
858  */
859  static const XalanDOMString&
861  {
862  return s_XalanNamespaceURL;
863  }
864 
865  /**
866  * Whether to warn about pattern match conflicts.
867  *
868  * @return true to not warn about pattern match conflicts
869  */
870  bool
872  {
873  return m_quietConflictWarnings;
874  }
875 
876  /**
877  * Retrieve the result namespace corresponding to a prefix.
878  *
879  * @param prefix prefix for namespace
880  * @return string for namespace URI
881  */
882  const XalanDOMString*
883  getResultNamespaceForPrefix(const XalanDOMString& prefix) const;
884 
885  /**
886  * Retrieve the result prefix corresponding to a namespace.
887  *
888  * @param theNamespace namespace for prefix
889  * @return string for namespace prefix
890  */
891  const XalanDOMString*
892  getResultPrefixForNamespace(const XalanDOMString& theNamespace) const;
893 
894  /**
895  * Determine whether or not a prefix is in use on the pending element or
896  * the pending attributes.
897  *
898  * @param thePrefix prefix for namespace
899  *
900  * @return true if the prefix is in use, false if not.
901  */
902  bool
903  isPendingResultPrefix(const XalanDOMString& thePrefix) const;
904 
905  /**
906  * Evaluate an xpath string and return the result as a numberic score.
907  *
908  * @param str string to evaluate
909  * @param context context node
910  * @param executionContext current execution context
911  * @return score number, higher representing better match
912  */
913  double
914  evalMatchPatternStr(
915  const XalanDOMString& str,
916  XalanNode* context,
917  XPathExecutionContext& executionContext);
918 
919  /**
920  * Create and initialize an xpath and return it.
921  *
922  * @param str string for XPath
923  * @param resolver resolver for namespace resolution
924  * @return pointer to XPath created
925  */
926  const XPath*
927  createMatchPattern(
928  const XalanDOMString& str,
929  const PrefixResolver& resolver);
930 
931  /**
932  * Return the xpath created by createXPath() or
933  * createMatchPattern().
934  *
935  * @param xpath The XPath to return.
936  */
937  void
938  returnXPath(const XPath* xpath);
939 
940  /**
941  * Copy XMLNS: attributes in if not already in scope.
942  *
943  * @param src source node
944  */
945  void
946  copyNamespaceAttributes(const XalanNode& src);
947 
948  /**
949  * Evaluate an xpath string and return the result.
950  *
951  * @param str string to evaluate
952  * @param executionContext current execution context
953  * @return pointer to XObject result
954  */
955  const XObjectPtr
956  evalXPathStr(
957  const XalanDOMString& str,
958  XPathExecutionContext& executionContext);
959 
960  /**
961  * Evaluate an xpath string and return the result.
962  *
963  * @param str string to evaluate
964  * @param contextNode context node
965  * @param prefixResolver prefix resolver to use
966  * @param executionContext current execution context
967  * @return pointer to XObject result
968  */
969  const XObjectPtr
970  evalXPathStr(
971  const XalanDOMString& str,
972  XalanNode* contextNode,
973  const PrefixResolver& prefixResolver,
974  XPathExecutionContext& executionContext);
975 
976  /**
977  * Evaluate an xpath string and return the result.
978  *
979  * @param str string to evaluate
980  * @param contextNode context node
981  * @param prefixResolver prefix resolver to use
982  * @param executionContext current execution context
983  * @return pointer to XObject result
984  */
985  const XObjectPtr
986  evalXPathStr(
987  const XalanDOMString& str,
988  XalanNode* contextNode,
989  const XalanElement& prefixResolver,
990  XPathExecutionContext& executionContext);
991 
992  /**
993  * Copy an attribute to an AttributeListImpl.
994  *
995  * @param attrName The name of the attribute
996  * @param attrValue The value of the attribute
997  * @param attrList The attribute list added to
998  */
999  void
1000  copyAttributeToTarget(
1001  const XalanDOMString& attrName,
1002  const XalanDOMString& attrValue,
1003  AttributeListImpl& attrList);
1004 
1005  /**
1006  * Get the factory for making xpaths.
1007  *
1008  * @return XPath factory object
1009  */
1010  XPathFactory&
1012  {
1013  return m_xpathFactory;
1014  }
1015 
1016  /**
1017  * Get the XPath processor object.
1018  *
1019  * @return XPathProcessor interface being used
1020  */
1021  XPathProcessor&
1023  {
1024  return *m_xpathProcessor.get();
1025  }
1026 
1027  /**
1028  * Reset the state. This needs to be called after a process() call
1029  * is invoked, if the processor is to be used again.
1030  */
1031  virtual void
1032  reset();
1033 
1034  /**
1035  * Retrieve the XPath environment support object
1036  *
1037  * @return XPath environment support object
1038  */
1039  XPathEnvSupport&
1041  {
1042  return m_xpathEnvSupport;
1043  }
1044 
1045  /**
1046  * Set the problem listener property. The XSL class can have a single
1047  * listener that can be informed of errors and warnings, and can normally
1048  * control if an exception is thrown or not (or the problem listeners can
1049  * throw their own RuntimeExceptions).
1050  *
1051  * @param l pointer to ProblemListener interface
1052  */
1053  void
1055  {
1056  m_problemListener = l;
1057  }
1058 
1059  /**
1060  * Get the problem listener property. The XSL class can have a single
1061  * listener that can be informed of errors and warnings, and can normally
1062  * control if an exception is thrown or not (or the problem listeners can
1063  * throw their own RuntimeExceptions).
1064  *
1065  * @return pointer to ProblemListener interface
1066  */
1069  {
1070  return m_problemListener;
1071  }
1072 
1073  /*
1074  * Push a new output context using the provided FormatterListener.
1075  *
1076  * @param A pointer to the FormatterListener instance for the new context.
1077  */
1078  void
1080  {
1081  m_outputContextStack.pushContext(theListener);
1082  }
1083 
1084  /*
1085  * Pop the current output context.
1086  */
1087  void
1089  {
1090  m_outputContextStack.popContext();
1091  }
1092 
1093  /*
1094  * See if there is a pending start document event waiting.
1095  * @return true if there is a start document event waiting.
1096  */
1097  bool
1099  {
1100  return getHasPendingStartDocumentImpl();
1101  }
1102 
1103  /*
1104  * Set the pending start document event state.
1105  * @param the new value
1106  */
1107  void
1109  {
1110  setHasPendingStartDocumentImpl(b);
1111  }
1112 
1113  /*
1114  * See if a pending start document event must be flushed.
1115  * @return true if the event must be flushed.
1116  */
1117  bool
1119  {
1120  return getMustFlushPendingStartDocumentImpl();
1121  }
1122 
1123  /*
1124  * Set the pending start document event flush state.
1125  * @param the new value
1126  */
1127  void
1129  {
1130  setMustFlushPendingStartDocumentImpl(b);
1131  }
1132 
1133  /**
1134  * Get the list of attributes yet to be processed
1135  *
1136  * @return attribute list
1137  */
1138  const AttributeListType&
1140  {
1141  return getPendingAttributesImpl();
1142  }
1143 
1144  /**
1145  * Set the list of attributes yet to be processed
1146  *
1147  * @param pendingAttributes The attribute list
1148  */
1149  void
1150  setPendingAttributes(const AttributeListType& pendingAttributes)
1151  {
1152  getPendingAttributesImpl() = pendingAttributes;
1153  }
1154 
1155  /**
1156  * Replace the contents of a pending attribute.
1157  *
1158  * @param theName name of attribute
1159  * @param theNewType type of attribute
1160  * @param theNewValue new value of attribute
1161  */
1162  void
1164  const XalanDOMChar* theName,
1165  const XalanDOMChar* theNewType,
1166  const XalanDOMChar* theNewValue)
1167  {
1168  // Remove the old attribute, then add the new one. AttributeListImpl::addAttribute()
1169  // does this for us.
1170  getPendingAttributesImpl().addAttribute(theName, theNewType, theNewValue);
1171  }
1172 
1173  bool
1175  {
1176  return !getPendingElementNameImpl().empty();
1177  }
1178 
1179  /**
1180  * Retrieve name of the pending element currently being processed.
1181  *
1182  * @return element name
1183  */
1184  const XalanDOMString&
1186  {
1187  return getPendingElementNameImpl();
1188  }
1189 
1190  /**
1191  * Changes the currently pending element name.
1192  *
1193  * @param elementName new name of element
1194  */
1195  void
1197  {
1198  setPendingElementNameImpl(elementName);
1199  }
1200 
1201  void
1202  setPendingElementName(const XalanDOMChar* elementName)
1203  {
1204  setPendingElementNameImpl(elementName);
1205  }
1206 
1207  /**
1208  * Get the locator from the top of the locator stack.
1209  *
1210  * @return A pointer to the Locator, or 0 if there is nothing on the stack.
1211  */
1212  const Locator*
1214  {
1215  return m_stylesheetLocatorStack.empty() == true ? 0 : m_stylesheetLocatorStack.back();
1216  }
1217 
1218  /**
1219  * Push a locator on to the locator stack.
1220  *
1221  * @param A pointer to the Locator to push.
1222  */
1223  void
1224  pushLocatorOnStack(const Locator* locator)
1225  {
1226  m_stylesheetLocatorStack.push_back(locator);
1227  }
1228 
1229  /**
1230  * Pop the locator from the top of the locator stack.
1231  */
1232  void
1234  {
1235  if (m_stylesheetLocatorStack.empty() == false)
1236  {
1237  m_stylesheetLocatorStack.pop_back();
1238  }
1239  }
1240 
1241 protected:
1242 
1243  /**
1244  * Get the list of attributes yet to be processed
1245  *
1246  * @return attribute list
1247  */
1248  const AttributeListImpl&
1250  {
1251  return m_outputContextStack.getPendingAttributes();
1252  }
1253 
1254  /**
1255  * Get the list of attributes yet to be processed
1256  *
1257  * @return attribute list
1258  */
1261  {
1262  return m_outputContextStack.getPendingAttributes();
1263  }
1264 
1265  /**
1266  * Set the list of attributes yet to be processed
1267  *
1268  * @param pendingAttributes The attribute list
1269  */
1270  void
1272  {
1273  getPendingAttributesImpl() = pendingAttributes;
1274  }
1275 
1276  /**
1277  * Retrieve name of the pending element currently being processed.
1278  *
1279  * @return element name
1280  */
1281  const XalanDOMString&
1283  {
1284  return m_outputContextStack.getPendingElementName();
1285  }
1286 
1287  /**
1288  * Retrieve name of the pending element currently being processed.
1289  *
1290  * @return element name
1291  */
1294  {
1295  return m_outputContextStack.getPendingElementName();
1296  }
1297 
1298  /**
1299  * Changes the currently pending element name.
1300  *
1301  * @param elementName new name of element
1302  */
1303  void
1305  {
1306  m_outputContextStack.getPendingElementName() = elementName;
1307  }
1308 
1309  /**
1310  * Changes the currently pending element name.
1311  *
1312  * @param elementName new name of element
1313  */
1314  void
1315  setPendingElementNameImpl(const XalanDOMChar* elementName)
1316  {
1317  assert(elementName != 0);
1318 
1319  m_outputContextStack.getPendingElementName() = elementName;
1320  }
1321 
1322  /*
1323  * See if there is a pending start document event waiting.
1324  * @return true if there is a start document event waiting.
1325  */
1326  bool
1328  {
1329  return m_outputContextStack.getHasPendingStartDocument();
1330  }
1331 
1332  /*
1333  * Set the pending start document event state.
1334  * @param the new value
1335  */
1336  void
1338  {
1339  m_outputContextStack.getHasPendingStartDocument() = b;
1340  }
1341 
1342  /*
1343  * See if a pending start document event must be flushed.
1344  * @return true if the event must be flushed.
1345  */
1346  bool
1348  {
1349  return m_outputContextStack.getMustFlushPendingStartDocument();
1350  }
1351 
1352  /*
1353  * Set the pending start document event flush state.
1354  * @param the new value
1355  */
1356  void
1358  {
1359  m_outputContextStack.getMustFlushPendingStartDocument() = b;
1360  }
1361 
1364  {
1365  return m_outputContextStack.getFormatterListener();
1366  }
1367 
1368  void
1370  {
1371  m_outputContextStack.getFormatterListener() = flistener;
1372  }
1373 
1374  /**
1375  * The namespace that the result tree conforms to. A null value
1376  * indicates that result-ns is not used and there is no checking.
1377  * A empty string indicates that the result tree conforms to the
1378  * default namespace.
1379  */
1381 
1382  /**
1383  * The URL that belongs to the result namespace.
1384  */
1386 
1387 
1388  /**
1389  * Copy the attributes from the XSL element to the created
1390  * output element.
1391  */
1392  void
1393  copyAttributesToAttList(
1394  const XalanNode& node,
1395  AttributeListImpl& attList);
1396 
1397  // Factory for creating xpaths.
1398  XPathFactory& m_xpathFactory;
1399 
1400  // Factory for creating xobjects
1402 
1403  // The query/pattern-matcher object.
1404  const XPathProcessorPtrType m_xpathProcessor;
1405 
1406  /**
1407  * Stack of Booleans to keep track of if we should be outputting
1408  * cdata instead of escaped text.
1409  */
1410  BoolVectorType m_cdataStack;
1411 
1412 private:
1413 
1414  /**
1415  * Issue a warning that only text nodes can be copied.
1416  *
1417  * @param sourceNode node in source where error occurred
1418  * @param locator The Locator to use, if any.
1419  */
1420  void
1421  warnCopyTextNodesOnly(
1422  const XalanNode* sourceNode,
1423  const Locator* locator);
1424 
1425  /**
1426  * Clone a text node to the result tree
1427  *
1428  * @param node node to clone
1429  * @param overrideStrip false if white space stripping should be done
1430  */
1431  void
1432  cloneToResultTree(
1433  const XalanText& node,
1434  bool overrideStrip);
1435 
1436  /**
1437  * Determine if any pending attributes is a default
1438  * namespace.
1439  */
1440  bool
1441  pendingAttributesHasDefaultNS() const;
1442 
1443  void
1444  addResultNamespace(
1445  const XalanDOMString& thePrefix,
1446  const XalanDOMString& theName,
1447  const XalanNode& theNode,
1448  AttributeListImpl& thePendingAttributes,
1449  bool fOnlyIfPrefixNotPresent);
1450 
1451  void
1452  addResultNamespace(
1453  const XalanNode& theNode,
1454  AttributeListImpl& thePendingAttributes,
1455  bool fOnlyIfPrefixNotPresent = false);
1456 
1457  /**
1458  * The top of this stack should contain the currently processed
1459  * stylesheet SAX locator object.
1460  */
1461  LocatorStack m_stylesheetLocatorStack;
1462 
1463  /**
1464  * The XSL class can have a single listener that can be informed
1465  * of errors and warnings, and can normally control if an exception
1466  * is thrown or not (or the problem listeners can throw their
1467  * own RuntimeExceptions).
1468  */
1469  ProblemListenerDefault m_defaultProblemListener;
1470 
1471  ProblemListener* m_problemListener;
1472 
1473  /**
1474  * The root of a linked set of stylesheets.
1475  */
1476  const StylesheetRoot* m_stylesheetRoot;
1477 
1478  /**
1479  * The namespace that we must match as a minimum for XSLT.
1480  */
1481  static const XalanDOMString& s_XSLNameSpaceURL; //"http://www.w3.org/1999/XSL/Transform"
1482 
1483  /**
1484  * Special Xalan namespace for built-in extensions.
1485  */
1486  static const XalanDOMString& s_XalanNamespaceURL; // "http://xml.apache.org/xalan"
1487 
1488  /**
1489  * Prefix to use when generating unique namespaces.
1490  */
1491  static const XalanDOMString& s_uniqueNamespacePrefix;
1492 
1493  /**
1494  * If this is set to true, selects will be traced
1495  */
1496  bool m_traceSelects;
1497 
1498  /**
1499  * If this is set to true, do not warn about pattern
1500  * match conflicts.
1501  */
1502  bool m_quietConflictWarnings;
1503 
1504  /*
1505  * A stream to print diagnostics to.
1506  */
1507  PrintWriter* m_diagnosticsPrintWriter;
1508 
1509  /**
1510  * List of listeners who are interested in tracing what's
1511  * being generated.
1512  */
1513  TraceListenerVectorType m_traceListeners;
1514 
1515  void
1516  problem(
1517  const XalanDOMString& msg,
1518  ProblemListener::eClassification classification,
1519  const XalanNode* sourceNode,
1520  const ElemTemplateElement* styleNode) const;
1521 
1522  void
1523  problem(
1524  const XalanDOMString& msg,
1525  ProblemListener::eClassification classification,
1526  const Locator& locator,
1527  const XalanNode* sourceNode) const;
1528 
1529  void
1530  problem(
1531  const XalanDOMString& msg,
1532  ProblemListener::eClassification classification) const;
1533 
1534  //==========================================================
1535  // SECTION: Function to do with attribute handling
1536  //==========================================================
1537 
1538  /**
1539  * This is used whenever a unique namespace is needed.
1540  */
1541  unsigned long m_uniqueNSValue;
1542 
1543  ParamVectorType m_topLevelParams;
1544 
1545 public:
1546 
1547  /**
1548  * Reset the vector of top level parameters
1549  */
1550  void
1552  {
1553  m_topLevelParams.clear();
1554  }
1555 
1556 private:
1557 
1558  bool
1559  generateCDATASection() const
1560  {
1561  if (m_hasCDATASectionElements == false)
1562  {
1563  return false;
1564  }
1565  else
1566  {
1567  assert(m_cdataStack.empty() == false);
1568 
1569  return m_cdataStack.back();
1570  }
1571  }
1572 
1573  void
1574  doFlushPending()
1575  {
1576  setMustFlushPendingStartDocument(true);
1577 
1578  flushPending();
1579  }
1580 
1581  /**
1582  * Tell if a given element name should output its text
1583  * as cdata.
1584  *
1585  * @param elementName name of element
1586  * @return true if it should output as cdata
1587  */
1588  bool
1589  isCDataResultElem(const XalanDOMString& elementName);
1590 
1591  void
1592  fireCharacterGenerateEvent(
1593  const XalanNode& theNode,
1594  bool isCDATA);
1595 
1596  void
1597  fireCharacterGenerateEvent(
1598  const XObjectPtr& theXObject,
1599  bool isCDATA);
1600 
1601  void
1602  fireCharacterGenerateEvent(
1603  const XalanDOMString& theString,
1604  bool isCDATA);
1605 
1606  void
1607  fireCharacterGenerateEvent(
1608  const XalanDOMChar* ch,
1609  size_type start,
1610  size_type length,
1611  bool isCDATA);
1612 
1613  void
1614  checkDefaultNamespace(
1615  const XalanDOMString& theElementName,
1616  const XalanDOMString& theElementNamespaceURI);
1617 
1618  void
1619  error(
1620  const XalanDOMString& theMessage,
1621  const Locator* theLocator,
1622  const XalanNode* theSourceNode);
1623 
1624  void
1625  warn(
1626  const XalanDOMString& theMessage,
1627  const Locator* theLocator,
1628  const XalanNode* theSourceNode);
1629 
1630  void
1631  message(
1632  const XalanDOMString& theMessage,
1633  const Locator* theLocator,
1634  const XalanNode* theSourceNode);
1635 
1636  // Data members...
1637  XMLParserLiaison& m_parserLiaison;
1638 
1639  XPathEnvSupport& m_xpathEnvSupport;
1640 
1641  DOMSupport& m_domSupport;
1642 
1643  /**
1644  * Current execution context...
1645  */
1646  StylesheetExecutionContext* m_executionContext;
1647 
1648  /*
1649  * Stack of current output contexts...
1650  */
1651  OutputContextStack m_outputContextStack;
1652 
1653  /*
1654  * Stack of current result namespaces...
1655  */
1656  XalanNamespacesStack m_resultNamespacesStack;
1657 
1658  /*
1659  * Dummy AttributeListImpl
1660  */
1661  AttributeListImpl m_dummyAttributesList;
1662 
1663  XalanDOMString m_scratchString;
1664 
1665  XalanDOMStringPointerVectorType m_attributeNamesVisited;
1666 
1667  bool m_hasCDATASectionElements;
1668 
1669  XPathConstructionContextDefault m_xpathConstructionContext;
1670 
1671  ParamMapType m_stylesheetParams;
1672 
1673  static void
1674  installFunctions(MemoryManager& theManager);
1675 
1676  static void
1677  uninstallFunctions();
1678 
1679 
1680  static const XalanDOMString s_emptyString;
1681 
1682  static const XalanDOMString& s_stylesheetNodeName;
1683  static const XalanDOMString& s_typeString;
1684  static const XalanDOMString& s_hrefString;
1685  static const XalanDOMString& s_piTokenizerString;
1686  static const XalanDOMString& s_typeValueString1;
1687  static const XalanDOMString& s_typeValueString2;
1688  static const XalanDOMString& s_typeValueString3;
1689  static const XalanDOMString& s_typeValueString4;
1690 
1691  // Not implemented...
1693 
1695  operator=(const XSLTEngineImpl&);
1696 
1697  bool
1698  operator==(const XSLTEngineImpl&) const;
1699 };
1700 
1701 
1702 
1703 XALAN_CPP_NAMESPACE_END
1704 
1705 
1706 
1707 #endif // XALAN_XSLTENGINEIMPL_HEADER_GUARD
XObjectFactory & m_xobjectFactory
size_type length() const
XPathFactory & m_xpathFactory
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMString &namespaceVal)
Add a namespace declaration to the namespace stack.
XPathExecutionContext::GetCachedString ECGetCachedString
bool isElementPending() const
ProblemListener * getProblemListener() const
Get the problem listener property.
void clearTopLevelParams()
Reset the vector of top level parameters.
const AttributeListType & getPendingAttributes() const
Get the list of attributes yet to be processed.
bool getQuietConflictWarnings() const
Whether to warn about pattern match conflicts.
FindStringPointerFunctor(const XalanDOMString &theString)
void outputResultTreeFragment(const XObject &theTree, bool outputTextNodesOnly, const Locator *locator)
Given a result tree fragment, walk the tree and output it to the result stream.
static const XalanDOMString & getXalanXSLNameSpaceURL()
Special Xalan namespace for built-in extensions.
StylesheetExecutionContext::ParamVectorType ParamVectorType
const XPathProcessorPtrType m_xpathProcessor
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack...
reference back()
void addResultAttribute(const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack...
void setFormatterListenerImpl(FormatterListener *flistener)
XalanSize_t size_type
void addResultAttribute(const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack...
const Locator * getLocatorFromStack() const
Get the locator from the top of the locator stack.
Class to hold XObjectPtr return types.
Definition: XObject.hpp:883
bool empty() const
Definition: XPath.hpp:64
void setPendingElementName(const XalanDOMChar *elementName)
This is the abstract class that the XSL processor uses when it has a problem of some kind...
This is the class for events generated by the XSL processor after it generates a new node in the resu...
XalanDOMString m_resultNameSpaceURL
The URL that belongs to the result namespace.
void popLocatorStack()
Pop the locator from the top of the locator stack.
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison...
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, size_type len)
Add a namespace declaration to the namespace stack.
bool getMustFlushPendingStartDocumentImpl() const
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack...
int compare(const XalanDOMString &theString) const
XPathEnvSupport & getXPathEnvSupport()
Retrieve the XPath environment support object.
AttributeListImpl & getPendingAttributesImpl()
Get the list of attributes yet to be processed.
void setPendingAttributes(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
MemoryManager & getMemoryManager() const
Local implementation of NodeRefList.
XalanMap< XalanDOMString, XalanParamHolder > ParamMapType
const XalanDOMString & getPendingElementNameImpl() const
Retrieve name of the pending element currently being processed.
void pushOutputContext(FormatterListener *theListener)
A SAX-based formatter interface for the XSL processor.
MemoryManager & getMemoryManager()
XalanVector< TraceListener * > TraceListenerVectorType
bool getHasPendingStartDocument() const
XPathConstructionContext::GetCachedString CCGetCachedString
const AttributeListImpl & getPendingAttributesImpl() const
Get the list of attributes yet to be processed.
void pushLocatorOnStack(const Locator *locator)
Push a locator on to the locator stack.
bool operator()(const XalanDOMString *theString) const
XalanDOMString & getPendingElementNameImpl()
Retrieve name of the pending element currently being processed.
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:46
const XalanDOMChar * c_str() const
void setHasPendingStartDocumentImpl(bool b)
BoolVectorType m_cdataStack
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text...
XalanVector< const Locator * > LocatorStack
const XalanDOMString & getPendingElementName() const
Retrieve name of the pending element currently being processed.
This class defines an interface for classes that resolve namespace prefixes to their URIs...
void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
Replace the contents of a pending attribute.
Class to hold XPath return types.
Definition: XObject.hpp:63
This is the parent class of events generated for tracing the progress of the XSL processor.
Definition: TracerEvent.hpp:49
void setPendingElementNameImpl(const XalanDOMString &elementName)
Changes the currently pending element name.
void setMustFlushPendingStartDocument(bool b)
void setPendingAttributesImpl(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
XERCES_CPP_NAMESPACE_QUALIFIER DocumentHandler DocumentHandlerType
Function::XObjectArgVectorType XObjectArgVectorType
#define XALAN_XSLT_EXPORT
FormatterListener * getFormatterListenerImpl() const
virtual const XalanDocumentFragment & rtree() const
Cast result object to a result tree fragment.
void setProblemListener(ProblemListener *l)
Set the problem listener property.
The implementation of the default error handling for Xalan.
XalanVector< bool > BoolVectorType
static const XalanDOMString & getXSLNameSpaceURL()
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
bool operator()(const XalanDOMString *theLHS, const XalanDOMString *theRHS) const
XPathProcessor & getXPathProcessor()
Get the XPath processor object.
void setPendingElementName(const XalanDOMString &elementName)
Changes the currently pending element name.
XERCES_CPP_NAMESPACE_QUALIFIER InputSource InputSourceType
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
XalanVector< const XalanDOMString * > XalanDOMStringPointerVectorType
bool getHasPendingStartDocumentImpl() const
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
void setMustFlushPendingStartDocumentImpl(bool b)
This is an interface for an XSLT Processor engine.
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:86
An default implementation of an abtract class which provides support for constructing the internal re...
XALAN_CPP_NAMESPACE_BEGIN XALAN_USING_XERCES(Locator)
bool getMustFlushPendingStartDocument() const
XPathFactory & getXPathFactory()
Get the factory for making xpaths.
This class handles the creation of XObjects and manages their lifetime.
XalanMemMgrAutoPtr< XPathProcessor > XPathProcessorPtrType
void setPendingElementNameImpl(const XalanDOMChar *elementName)
Changes the currently pending element name.
void setHasPendingStartDocument(bool b)
XalanDOMString m_resultNameSpacePrefix
The namespace that the result tree conforms to.

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