Xalan-C++ API Reference  1.12.0
Stylesheet.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 
19 #if !defined(XALAN_STYLESHEET_HEADER_GUARD)
20 #define XALAN_STYLESHEET_HEADER_GUARD
21 
22 
23 
24 // Base include file. Must be first.
25 #include "XSLTDefinitions.hpp"
26 
27 
28 
31 
32 
33 
36 
37 
38 
40 
41 
42 
45 #include <xalanc/XPath/XPath.hpp>
46 
47 
48 
54 
55 
56 
57 namespace XALAN_CPP_NAMESPACE {
58 
59 
60 
61 class ExtensionNSHandler;
62 class XalanDecimalFormatSymbols;
63 class ElemDecimalFormat;
64 class ElemTemplate;
65 class ElemTemplateElement;
66 class ElemVariable;
67 class KeyTable;
68 class NodeRefListBase;
69 class PrefixResolver;
70 class StylesheetConstructionContext;
71 class StylesheetRoot;
72 class XalanMatchPatternData;
73 class XalanQName;
74 class XObject;
76 
77 
80 
81 
82 /**
83  * This class represents the base stylesheet or an "import" stylesheet.
84  * "include" stylesheets are combined with the including stylesheet.
85  */
87 {
88 
89 public:
90 
94 
102 
104 
107 
109 
111 
113 
114  /**
115  * Constructor for a Stylesheet needs a Document.
116  * @exception XSLProcessorException thrown if the active ProblemListener and XMLParserLiaison decide
117  * the error condition is severe enough to halt processing.
118  */
119  Stylesheet(
120  StylesheetRoot& root,
121  const XalanDOMString& baseIdentifier,
122  StylesheetConstructionContext& constructionContext);
123 
124  virtual
125  ~Stylesheet();
126 
127  static Stylesheet*
128  create(MemoryManager& theManager,
129  StylesheetRoot& root,
130  const XalanDOMString& baseIdentifier,
131  StylesheetConstructionContext& constructionContext);
132 
133  MemoryManager&
135  {
136  return m_elementPatternTable.getMemoryManager();
137  }
138 
139  /**
140  * Retrieve XSLT version number
141  *
142  * @return number representing XSLT version
143  */
144  double
146  {
147  return m_XSLTVerDeclared;
148  }
149 
150  /**
151  * Set XSLT version number
152  *
153  * @param ver number representing XSLT version
154  */
155  void
156  setXSLTVerDeclared(double ver)
157  {
158  m_XSLTVerDeclared = ver;
159  }
160 
161  /**
162  * Retrieve the root stylesheet object
163  *
164  * @return const reference to the stylesheet object
165  */
166  const StylesheetRoot&
168  {
169  return m_stylesheetRoot;
170  }
171 
172  /**
173  * Retrieve the root stylesheet object
174  *
175  * @return reference to the stylesheet object
176  */
179  {
180  return m_stylesheetRoot;
181  }
182 
183  /**
184  * Retrieve the stack of namespace lists
185  *
186  * @return vector of namespace vectors
187  */
188  const NamespacesStackType&
190  {
191  return m_namespaces;
192  }
193 
194  /**
195  * Retrieve the stack of namespace lists
196  *
197  * @return vector of namespace vectors
198  */
199  NamespacesStackType&
201  {
202  return m_namespaces;
203  }
204 
205  const NamespacesHandler&
207  {
208  return m_namespacesHandler;
209  }
210 
213  {
214  return m_namespacesHandler;
215  }
216 
217  /**
218  * Retrieve the list of namespace declarations currently in effect
219  *
220  * @return vector of namespace vectors
221  */
222  const NamespaceVectorType&
224  {
225  return m_namespaceDecls;
226  }
227 
228  /**
229  * Retrieve the list of namespace declarations currently in effect
230  *
231  * @return vector of namespace vectors
232  */
233  NamespaceVectorType&
235  {
236  return m_namespaceDecls;
237  }
238 
239  /**
240  * Set the list of namespace declarations currently in effect
241  *
242  * @param ns vector of namespace vectors
243  */
244  void
246  {
247  m_namespaceDecls = ns;
248  }
249 
250  /**
251  * Push the namespace declarations from the current attribute
252  * list onto the namespace stack.
253  *
254  * @param atts attribute list constaining namespaces
255  */
256  void
257  pushNamespaces(const AttributeListType& atts);
258 
259  /**
260  * Pop a namespace declaration from the namespace stack.
261  */
262  void
264  {
265  assert(m_namespaces.empty() == false);
266 
267  m_namespaces.pop_back();
268  }
269 
270  void
271  addWhitespaceElement(const XalanSpaceNodeTester& theTester);
272 
273  /**
274  * Called after construction is completed.
275  */
276  virtual void
277  postConstruction(StylesheetConstructionContext& constructionContext);
278 
279  /**
280  * See if this is a xmlns attribute, and, if so, process it.
281  *
282  * @param attrName qualified name of attribute
283  * @param atts attribute list where the element comes from (not used at
284  * this time)
285  * @param which index into the attribute list (not used at this time)
286  * @return true if this is a namespace name
287  */
288  bool
289  isAttrOK(
290  const XalanDOMChar* attrName,
291  const AttributeListType& atts,
292  XalanSize_t which,
293  StylesheetConstructionContext& constructionContext) const;
294 
295  /**
296  * Get the namespace from a qualified name.
297  *
298  * @param nodeName name of node
299  * @return namespace string for node, or null if not found.
300  */
301  const XalanDOMString*
303  const XalanDOMString& nodeName,
304  XalanDOMString& theBuffer) const
305  {
306  return getNamespaceFromStack(nodeName.c_str(), theBuffer);
307  }
308 
309  /**
310  * Get the namespace from a qualified name.
311  *
312  * @param nodeName name of node
313  * @return namespace string for node, or null if not found.
314  */
315  const XalanDOMString*
316  getNamespaceFromStack(
317  const XalanDOMChar* nodeName,
318  XalanDOMString& theBuffer) const;
319 
320  /**
321  * Get the namespace from a prefix by searching the stack of namespace
322  * lists.
323  *
324  * @param prefix prefix to search
325  * @return namespace corresponding to prefix, or null if not found.
326  */
327  const XalanDOMString*
329  {
330  return XalanQName::getNamespaceForPrefix(m_namespaces, prefix);
331  }
332 
333  /**
334  * Get the namespace from a prefix by searching the stack of namespace
335  * lists.
336  *
337  * @param prefix prefix to search
338  * @return namespace corresponding to prefix, or null if not found.
339  */
340  const XalanDOMString*
341  getNamespaceForPrefixFromStack(const XalanDOMChar* prefix) const
342  {
343  assert(prefix != 0);
344 
345  return XalanQName::getNamespaceForPrefix(m_namespaces, (const XalanDOMChar*)prefix);
346  }
347 
348  /**
349  * Get the namespace for a prefix, and report an error if it wasn't found.
350  *
351  * @param prefix prefix to search
352  * @param constructionContext The current construction context
353  * @return namespace corresponding to prefix, or null if not found.
354  */
355  const XalanDOMString*
356  getNamespaceForPrefix(
357  const XalanDOMString& prefix,
358  StylesheetConstructionContext& constructionContext) const;
359 
360  /**
361  * Get the namespace for a prefix, and report an error if it wasn't found.
362  *
363  * @param prefix prefix to search
364  * @param constructionContext The current construction context
365  * @return namespace corresponding to prefix, or null if not found.
366  */
367  const XalanDOMString*
368  getNamespaceForPrefix(
369  const XalanDOMChar* prefix,
370  StylesheetConstructionContext& constructionContext) const;
371 
372  /**
373  * See if a namespace should be excluded.
374  *
375  * @param theConstructionContext the current construction context.
376  * @param theValue the prefix of the namespace.
377  * @return
378  */
379  void
381  StylesheetConstructionContext& theConstructionContext,
382  const XalanDOMChar* theValue)
383  {
384  m_namespacesHandler.processExcludeResultPrefixes(
385  theConstructionContext,
386  theValue,
387  m_namespaces);
388  }
389 
390  /**
391  * Add a template to the list of names templates
392  *
393  * @param theTemplate template to add
394  * @param constructionContext context for construction
395  */
396  void
397  addTemplate(
398  ElemTemplate* theTemplate,
399  StylesheetConstructionContext& constructionContext);
400 
401  /**
402  * Process an attribute that has the value of 'yes' or 'no'.
403  *
404  * @param aname name of attribute
405  * @param val value
406  * @param constructionContext context for construction
407  * @return true if value equals string constant for "yes," false otherwise
408  */
409  bool
410  getYesOrNo(
411  const XalanDOMChar* aname,
412  const XalanDOMChar* val,
413  StylesheetConstructionContext& constructionContext) const;
414 
415  /**
416  * Retrieve the base identifier with which this stylesheet is associated.
417  *
418  * @return string for base identifier
419  */
420  const XalanDOMString&
422  {
423  return m_baseIdent;
424  }
425 
426  /**
427  * Retrieve the base identifier for the most recently
428  * included stylesheet. This will return the same value
429  * as getBaseIdentifier(), if no include is being
430  * processed.
431  *
432  * @return string for base identifier
433  */
434  const XalanDOMString&
436  {
437  return m_includeStack.empty() == true ? getBaseIdentifier() : m_includeStack.back();
438  }
439 
440  /**
441  * Process an xsl:namespace-alias element.
442  *
443  * @param name the element name.
444  * @param attrs the current attribute list
445  * @param constructionContext the active construction context
446  */
447  void
448  processNSAliasElement(
449  const XalanDOMChar* name,
450  const AttributeListType& atts,
451  StylesheetConstructionContext& constructionContext);
452 
453  /**
454  * Process an xsl:decimal-format element.
455  *
456  * @param elemDecimalFormat the element
457  */
458  void
459  processDecimalFormatElement(
460  StylesheetConstructionContext& constructionContext,
461  const AttributeListType& atts,
462  const Locator* locator = 0);
463 
464  /**
465  * Retrieve the XalanDecimalFormatSymbols instance associated with
466  * the QName.
467  *
468  * @param theQName the QName for the lookup
469  * @return a pointer to the matching instance, or 0 if none was found
470  */
472  getDecimalFormatSymbols(const XalanQName& theQName) const;
473 
474  /**
475  * Add an imported stylesheet.
476  *
477  * @param theStylesheet The stylesheet to add.
478  */
479  void
480  addImport(Stylesheet* theStylesheet)
481  {
482  m_imports.insert(m_imports.begin(), theStylesheet);
483  }
484 
485  /**
486  * whether there is a wrapper template
487  *
488  * @return true is there is a wrapper
489  */
490  bool
492  {
493  return m_isWrapperless;
494  }
495 
497  initWrapperless(
498  StylesheetConstructionContext& constructionContext,
499  const Locator* locator);
500 
501  /**
502  * Retrieve the stack of who's including who
503  *
504  * @return stack of includes
505  */
506  URLStackType&
508  {
509  return m_includeStack;
510  }
511 
512  /**
513  * Process the xsl:key element.
514  *
515  * @param nsContext The PrefixResolver instance for namespace prefixes.
516  * @param atts The attribute list for element.
517  * #param locator The Locator instance for error reporting, if any. May be 0.
518  * @param constructionContext The current construction context.
519  */
520  void
521  processKeyElement(
522  const PrefixResolver& nsContext,
523  const AttributeListType& atts,
524  const Locator* locator,
525  StylesheetConstructionContext& constructionContext);
526 
527  /**
528  * Locate a template via the "name" attribute.
529  *
530  * @param name qualified name of template
531  * @return pointer to template found or 0 if none found
532  */
533  const ElemTemplate*
534  findNamedTemplate(const XalanQName& qname) const;
535 
536  /**
537  * Given a target element, find the template that best matches in the given
538  * XSL document, according to the rules specified in the xsl draft.
539  *
540  * @param executionContext current execution context
541  * @param targetNode element that needs a rule
542  * @return pointer to rule that best matches targetNode
543  */
544  const ElemTemplate*
546  StylesheetExecutionContext& executionContext,
547  XalanNode* targetNode) const
548  {
549  assert(targetNode != 0);
550 
551  return findTemplate(
552  executionContext,
553  targetNode,
554  targetNode->getNodeType(),
555  s_emptyQName,
556  false);
557  }
558 
559  /**
560  * Given a target element, find the template that best matches in the given
561  * XSL document, according to the rules specified in the xsl draft.
562  *
563  * @param executionContext current execution context
564  * @param targetNode node that needs a rule
565  * @param targetNodeType the type of targetNode
566  * @param mode string indicating the mode
567  * @param onlyUseImports only use imports, do not use any templates from the stylesheet itself
568  * @return pointer to rule that best matches targetElem
569  */
570  const ElemTemplate*
571  findTemplate(
572  StylesheetExecutionContext& executionContext,
573  XalanNode* targetNode,
574  XalanNode::NodeType targetNodeType,
575  const XalanQName& mode,
576  bool onlyUseImports) const;
577 
578  /**
579  * Add object to vector of match patterns if not already there.
580  *
581  * @param thePattern pattern to add
582  * @param theVector vector of patterns to add to
583  */
584  static void
585  addObjectIfNotFound(
586  const XalanMatchPatternData* thePattern,
587  PatternTableVectorType& theVector);
588 
589  /**
590  * Add object to array of match patterns if not already there.
591  * theArraySize size will be incremented if the pattern was
592  * added.
593  *
594  * @param thePattern pattern to add
595  * @param theArray vector of patterns to add to
596  * @param theArraySize The size of the array
597  */
598  static void
599  addObjectIfNotFound(
600  const XalanMatchPatternData* thePattern,
601  const XalanMatchPatternData* theArray[],
602  XalanSize_t& theArraySize);
603 
604  /**
605  * Given a name, locate the start of a list of
606  * possible templates that match that name. If
607  * none match, then use the default list.
608  *
609  * @param theName The name to match
610  */
611  const PatternTableVectorType*
612  locateElementMatchPatternDataList(const XalanDOMString& theName) const;
613 
614  /**
615  * Given a name, locate the start of a list of
616  * possible templates that match that name. If
617  * none match, then use the default list.
618  *
619  * @param theName The name to match
620  */
621  const PatternTableVectorType*
622  locateAttributeMatchPatternDataList(const XalanDOMString& theName) const;
623 
624  /**
625  * Given a XalanNode, locate the start of a list of
626  * possible templates that match it.
627  *
628  * @param XalanNode The node to match
629  */
630  const PatternTableVectorType*
631  locateMatchPatternDataList(
632  const XalanNode& theNode,
633  XalanNode::NodeType targetNodeType) const;
634 
635  /**
636  * Add an extension namespace handler. This provides methods for calling
637  * an element extension as well as for function calls (which is passed
638  * on to XPath).
639  *
640  * @param constructionContext The current construction context.
641  * @param uri The namespace URI of the extension.
642  */
643  void
644  processExtensionNamespace(
645  StylesheetConstructionContext& theConstructionContext,
646  const XalanDOMString& uri);
647 
648  /**
649  * Return the handler for a given extension namespace.
650  *
651  * @param uri the URI of the extension namespace.
652  * @return pointer to extension handler
653  */
656  {
658  m_extensionNamespaces.find(uri);
659 
660  return it == m_extensionNamespaces.end() ? 0 : (*it).second;
661  }
662 
663  /**
664  * Set a top level variable.
665  *
666  * @param var top-level variable declared with "xsl:variable" or
667  * xsl:param-variable.
668  */
669  void
671  {
672  m_topLevelVariables.push_back(var);
673  }
674 
675  /**
676  * Set a list of top level variables in the specified execution context
677  * stylesheet.
678  *
679  * @param executionContext current execution context
680  * @param topLevelParams list of top level parameters
681  */
682  void
683  pushTopLevelVariables(
684  StylesheetExecutionContext& executionContext,
685  const ParamVectorType& topLevelParams) const;
686 
687 
688  // These interfaces are inherited from PrefixResolver...
689 
690  virtual const XalanDOMString*
691  getNamespaceForPrefix(const XalanDOMString& prefix) const;
692 
693  virtual const XalanDOMString&
694  getURI() const;
695 
696  const XalanDOMString&
698  {
699  return m_XSLTNamespaceURI;
700  }
701 
702  void
704  {
705  m_XSLTNamespaceURI = theURI;
706  }
707 
708  const ElemTemplate*
710  {
711  return m_firstTemplate;
712  }
713 
714 protected:
715 
716  /**
717  * The root of the stylesheet tree.
718  */
720 
721  /**
722  * The base URL of the XSL document.
723  */
725 
726  /**
727  * Table of KeyDeclaration objects, which are set by the
728  * xsl:key element.
729  */
731 
733 
735 
736 private:
737 
738  // Not defined...
739  Stylesheet(const Stylesheet&);
740 
741  Stylesheet&
742  operator=(const Stylesheet&);
743 
744  bool
745  operator==(const Stylesheet&) const;
746 
747  void
748  error(
749  StylesheetConstructionContext& theContext,
750  XalanMessages::Codes theErrorCode,
751  const Locator* theLocator,
752  const XalanDOMChar* theParam1 = 0,
753  const XalanDOMChar* theParam2 = 0,
754  const XalanDOMChar* theParam3 = 0) const;
755 
756  /**
757  * Given a target element, find the template that best matches in the given
758  * stylesheet, using only imports
759  *
760  * @param executionContext current execution context
761  * @param targetNode node that needs a rule
762  * @param targetNodeType the type of targetNode
763  * @param mode string indicating the mode
764  * @return pointer to rule that best matches targetElem
765  */
766  const ElemTemplate*
767  findTemplateInImports(
768  StylesheetExecutionContext& executionContext,
769  XalanNode* targetNode,
770  XalanNode::NodeType targetNodeType,
771  const XalanQName& mode) const;
772 
773  /**
774  * The full XSLT Namespace URI. To be replaced by the one actually
775  * found.
776  */
777  XalanDOMString m_XSLTNamespaceURI;
778 
779  /**
780  * A vector of the -imported- XSL Stylesheets.
781  */
782  StylesheetVectorType m_imports;
783 
784  StylesheetVectorType::size_type m_importsSize;
785 
786  /**
787  * A stack to keep track of the result tree namespaces.
788  */
789  NamespacesStackType m_namespaces;
790 
791  /**
792  * A list of namespace declarations,
793  * for mapping from prefix to namespace URI.
794  */
795  NamespaceVectorType m_namespaceDecls;
796 
797  /**
798  * Tells if the stylesheet is without an xsl:stylesheet and xsl:template
799  * wrapper.
800  */
801  bool m_isWrapperless;
802 
803  /**
804  * The table of extension namespaces.
805  */
806  ExtensionNamespacesMapType m_extensionNamespaces;
807 
808  /**
809  * The first template of the template children.
810  */
811  ElemTemplate* m_firstTemplate;
812 
813  /**
814  * A stack of who's including who is needed in order to support "It is an
815  * error if a stylesheet directly or indirectly includes itself."
816  */
817  URLStackType m_includeStack;
818 
819  /**
820  * Keyed on string macro names, and holding values that are macro elements
821  * in the XSL DOM tree. Initialized in initMacroLookupTable, and used in
822  * findNamedTemplate.
823  */
824  ElemTemplateMapType m_namedTemplates;
825 
826  /**
827  * Table for defined constants, keyed on the names.
828  */
829  ElemVariableVectorType m_topLevelVariables;
830 
831  /**
832  * The version of XSL that was declared.
833  */
834  double m_XSLTVerDeclared;
835 
836  /**
837  * This table is keyed on the target elements of patterns, and contains linked
838  * lists of the actual patterns that match the target element to some degree
839  * of specifity.
840  */
841  PatternTableMapType m_elementPatternTable;
842 
843  const PatternTableMapType::const_iterator m_elementPatternTableEnd;
844 
845  PatternTableVectorType m_elementAnyPatternList;
846 
847  /**
848  * This table is keyed on the target attributes of patterns, and contains linked
849  * lists of the actual patterns that match the target attribute to some degree
850  * of specifity.
851  */
852  PatternTableMapType m_attributePatternTable;
853 
854  const PatternTableMapType::const_iterator m_attributePatternTableEnd;
855 
856  PatternTableVectorType m_attributeAnyPatternList;
857 
858  /**
859  * These tables are for text, comment, root, and PI node templates.
860  */
861  PatternTableVectorType m_textPatternList;
862 
863  PatternTableVectorType m_commentPatternList;
864 
865  PatternTableVectorType m_rootPatternList;
866 
867  PatternTableVectorType m_piPatternList;
868 
869  /**
870  * This table is for patterns that match "node()".
871  */
872  PatternTableVectorType m_nodePatternList;
873 
874  size_type m_patternCount;
875 
876  ElemDecimalFormatVectorType m_elemDecimalFormats;
877 
878  NamespacesHandler m_namespacesHandler;
879 
880  static const XalanDOMString s_emptyString;
881 
882  static const PatternTableVectorType s_emptyTemplateList;
883 };
884 
885 
886 
887 }
888 
889 
890 
891 #endif // XALAN_STYLESHEET_HEADER_GUARD
xalanc::Stylesheet::m_whitespaceElements
WhitespaceElementsVectorType m_whitespaceElements
Definition: Stylesheet.hpp:732
xalanc::Stylesheet::s_emptyQName
static const XalanQNameByReference s_emptyQName
Definition: Stylesheet.hpp:734
xalanc::Stylesheet::findTemplate
const ElemTemplate * findTemplate(StylesheetExecutionContext &executionContext, XalanNode *targetNode) const
Given a target element, find the template that best matches in the given XSL document,...
Definition: Stylesheet.hpp:545
xalanc::Stylesheet::ElemDecimalFormatVectorType
XalanVector< ElemDecimalFormat * > ElemDecimalFormatVectorType
Definition: Stylesheet.hpp:99
xalanc::Stylesheet::getBaseIdentifier
const XalanDOMString & getBaseIdentifier() const
Retrieve the base identifier with which this stylesheet is associated.
Definition: Stylesheet.hpp:421
xalanc::ExtensionNSHandler
Definition: ExtensionNSHandler.hpp:56
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
XalanSpaceNodeTester.hpp
xalanc::Stylesheet::isWrapperless
bool isWrapperless() const
whether there is a wrapper template
Definition: Stylesheet.hpp:491
xalanc::AttributeListType
xercesc::AttributeList AttributeListType
Definition: AttributeListImpl.hpp:41
xalanc::Stylesheet::NamespacesStackType
XalanQName::NamespacesStackType NamespacesStackType
Definition: Stylesheet.hpp:93
xalanc::Stylesheet::StylesheetVectorType
XalanVector< Stylesheet * > StylesheetVectorType
Definition: Stylesheet.hpp:97
xalanc::StylesheetExecutionContext
Definition: StylesheetExecutionContext.hpp:106
PrefixResolver.hpp
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::Stylesheet::getXSLTVerDeclared
double getXSLTVerDeclared() const
Retrieve XSLT version number.
Definition: Stylesheet.hpp:145
xalanc::Stylesheet::PatternTableMapType
XalanMap< XalanDOMString, PatternTableVectorType > PatternTableMapType
Definition: Stylesheet.hpp:110
xalanc::XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:47
XalanDOMString.hpp
xalanc::XalanVector
Definition: XalanVector.hpp:58
xalanc::Stylesheet::WhitespaceElementsVectorType
XalanVector< XalanSpaceNodeTester > WhitespaceElementsVectorType
Definition: Stylesheet.hpp:100
XALAN_USES_MEMORY_MANAGER
#define XALAN_USES_MEMORY_MANAGER(Type)
Definition: XalanMemoryManagement.hpp:589
xalanc::XalanDecimalFormatSymbols
Definition: XalanDecimalFormatSymbols.hpp:40
xalanc::Stylesheet::GetCachedString
StylesheetConstructionContext::GetCachedString GetCachedString
Definition: Stylesheet.hpp:112
xalanc::Stylesheet::PatternTableVectorType
PatternTableVectorTypeDecl PatternTableVectorType
Definition: Stylesheet.hpp:101
xalanc::Stylesheet::ExtensionNamespacesMapType
XalanMap< XalanDOMString, ExtensionNSHandler * > ExtensionNamespacesMapType
Definition: Stylesheet.hpp:103
xalanc::XalanQNameByReference
Definition: XalanQNameByReference.hpp:37
XALAN_XSLT_EXPORT
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:27
xalanc::Stylesheet::getCurrentIncludeBaseIdentifier
const XalanDOMString & getCurrentIncludeBaseIdentifier() const
Retrieve the base identifier for the most recently included stylesheet.
Definition: Stylesheet.hpp:435
xalanc::Stylesheet::getStylesheetRoot
StylesheetRoot & getStylesheetRoot()
Retrieve the root stylesheet object.
Definition: Stylesheet.hpp:178
xalanc::size_type
size_t size_type
Definition: XalanMap.hpp:46
xalanc::Stylesheet::popNamespaces
void popNamespaces()
Pop a namespace declaration from the namespace stack.
Definition: Stylesheet.hpp:263
xalanc::ElemTemplateElement
Definition: ElemTemplateElement.hpp:79
xalanc::Stylesheet::getStylesheetRoot
const StylesheetRoot & getStylesheetRoot() const
Retrieve the root stylesheet object.
Definition: Stylesheet.hpp:167
xalanc::XalanDOMString::empty
bool empty() const
Definition: XalanDOMString.hpp:304
xalanc::XalanMatchPatternData
This class contains information concerning a match pattern in a stylesheet.
Definition: XalanMatchPatternData.hpp:52
XalanVector.hpp
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::Stylesheet::setNamespaceDecls
void setNamespaceDecls(const NamespaceVectorType &ns)
Set the list of namespace declarations currently in effect.
Definition: Stylesheet.hpp:245
xalanc::Stylesheet::URLStackType
XalanVector< XalanDOMString > URLStackType
Definition: Stylesheet.hpp:98
xalanc::NamespacesHandler
Definition: NamespacesHandler.hpp:52
xalanc::Stylesheet::getNamespaces
const NamespacesStackType & getNamespaces() const
Retrieve the stack of namespace lists.
Definition: Stylesheet.hpp:189
xalanc::Stylesheet::getNamespaceDecls
NamespaceVectorType & getNamespaceDecls()
Retrieve the list of namespace declarations currently in effect.
Definition: Stylesheet.hpp:234
xalanc::XalanDeque
Xalan implementation of deque.
Definition: XalanDeque.hpp:200
xalanc::Stylesheet::NamespaceVectorType
XalanQName::NamespaceVectorType NamespaceVectorType
Definition: Stylesheet.hpp:92
xalanc::Stylesheet::getFirstTemplate
const ElemTemplate * getFirstTemplate() const
Definition: Stylesheet.hpp:709
xalanc::XPathConstructionContext::GetCachedString
Definition: XPathConstructionContext.hpp:140
xalanc::XalanNode::getNodeType
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
XalanQNameByReference.hpp
NameSpace.hpp
xalanc::Stylesheet::getIncludeStack
URLStackType & getIncludeStack()
Retrieve the stack of who's including who.
Definition: Stylesheet.hpp:507
xalanc::Stylesheet::m_baseIdent
XalanDOMString m_baseIdent
The base URL of the XSL document.
Definition: Stylesheet.hpp:724
xalanc::Stylesheet::setTopLevelVariable
void setTopLevelVariable(ElemVariable *var)
Set a top level variable.
Definition: Stylesheet.hpp:670
xalanc::Stylesheet::getNamespacesHandler
NamespacesHandler & getNamespacesHandler()
Definition: Stylesheet.hpp:212
XalanNode.hpp
xalanc::Stylesheet::getNamespaceFromStack
const XalanDOMString * getNamespaceFromStack(const XalanDOMString &nodeName, XalanDOMString &theBuffer) const
Get the namespace from a qualified name.
Definition: Stylesheet.hpp:302
xalanc::Stylesheet::getNamespaceDecls
const NamespaceVectorType & getNamespaceDecls() const
Retrieve the list of namespace declarations currently in effect.
Definition: Stylesheet.hpp:223
xalanc::StylesheetConstructionContext
Definition: StylesheetConstructionContext.hpp:83
xalanc::Stylesheet::addImport
void addImport(Stylesheet *theStylesheet)
Add an imported stylesheet.
Definition: Stylesheet.hpp:480
xalanc::Stylesheet::processExcludeResultPrefixes
void processExcludeResultPrefixes(StylesheetConstructionContext &theConstructionContext, const XalanDOMChar *theValue)
See if a namespace should be excluded.
Definition: Stylesheet.hpp:380
NamespacesHandler.hpp
xalanc::Stylesheet::m_keyDeclarations
KeyDeclarationVectorType m_keyDeclarations
Table of KeyDeclaration objects, which are set by the xsl:key element.
Definition: Stylesheet.hpp:730
xalanc::PrefixResolver
This class defines an interface for classes that resolve namespace prefixes to their URIs.
Definition: PrefixResolver.hpp:39
xalanc::Stylesheet::getNamespaceForPrefixFromStack
const XalanDOMString * getNamespaceForPrefixFromStack(const XalanDOMString &prefix) const
Get the namespace from a prefix by searching the stack of namespace lists.
Definition: Stylesheet.hpp:328
xalanc::ElemVariable
Definition: ElemVariable.hpp:47
xalanc::Stylesheet::KeyTablesTableType
XalanMap< const XalanNode *, KeyTable * > KeyTablesTableType
Definition: Stylesheet.hpp:108
xalanc::Stylesheet::setXSLTNamespaceURI
void setXSLTNamespaceURI(const XalanDOMString &theURI)
Definition: Stylesheet.hpp:703
xalanc::XalanMap< XalanDOMString, ExtensionNSHandler * >
XPath.hpp
xalanc::Stylesheet::KeyDeclarationVectorType
XalanVector< KeyDeclaration > KeyDeclarationVectorType
Definition: Stylesheet.hpp:96
xalanc::Stylesheet::getNamespaceForPrefixFromStack
const XalanDOMString * getNamespaceForPrefixFromStack(const XalanDOMChar *prefix) const
Get the namespace from a prefix by searching the stack of namespace lists.
Definition: Stylesheet.hpp:341
xalanc::Stylesheet::ElemVariableVectorType
XalanVector< ElemVariable * > ElemVariableVectorType
Definition: Stylesheet.hpp:95
XalanMap.hpp
xalanc::XalanDOMString::c_str
const XalanDOMChar * c_str() const
Definition: XalanDOMString.hpp:344
xalanc::ElemTemplate
Definition: ElemTemplate.hpp:43
xalanc::StylesheetRoot
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
Definition: StylesheetRoot.hpp:63
XSLTDefinitions.hpp
xalanc::Stylesheet::m_stylesheetRoot
StylesheetRoot & m_stylesheetRoot
The root of the stylesheet tree.
Definition: Stylesheet.hpp:719
KeyDeclaration.hpp
xalanc::Stylesheet::ElemTemplateMapType
XalanMap< XalanQNameByReference, const ElemTemplate * > ElemTemplateMapType
Definition: Stylesheet.hpp:106
xalanc::Stylesheet
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:86
xalanc::Stylesheet::getNamespacesHandler
const NamespacesHandler & getNamespacesHandler() const
Definition: Stylesheet.hpp:206
xalanc::Stylesheet::ParamVectorType
StylesheetExecutionContext::ParamVectorType ParamVectorType
Definition: Stylesheet.hpp:91
xalanc::XalanQName
Class to represent a qualified name.
Definition: XalanQName.hpp:70
StylesheetConstructionContext.hpp
xalanc::Stylesheet::setXSLTVerDeclared
void setXSLTVerDeclared(double ver)
Set XSLT version number.
Definition: Stylesheet.hpp:156
xalanc::Stylesheet::getMemoryManager
MemoryManager & getMemoryManager()
Definition: Stylesheet.hpp:134
xalanc::XalanSpaceNodeTester
Definition: XalanSpaceNodeTester.hpp:41
xalanc::Stylesheet::getNamespaces
NamespacesStackType & getNamespaces()
Retrieve the stack of namespace lists.
Definition: Stylesheet.hpp:200
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::Stylesheet::getXSLTNamespaceURI
const XalanDOMString & getXSLTNamespaceURI() const
Definition: Stylesheet.hpp:697
xalanc::XalanMapIterator
Definition: XalanMap.hpp:115
StylesheetExecutionContext.hpp
xalanc::PatternTableVectorTypeDecl
XalanVector< const XalanMatchPatternData * > PatternTableVectorTypeDecl
Definition: Stylesheet.hpp:75
xalanc::XalanVector< Stylesheet * >::size_type
size_t size_type
Definition: XalanVector.hpp:68
xalanc::Stylesheet::lookupExtensionNSHandler
ExtensionNSHandler * lookupExtensionNSHandler(const XalanDOMString &uri) const
Return the handler for a given extension namespace.
Definition: Stylesheet.hpp:655