Xalan-C++ API Reference  1.12.0
StylesheetConstructionContext.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(STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680)
19 #define STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
29 
30 
31 
33 
34 
35 
37 #include <xalanc/XPath/XPath.hpp>
39 
40 
41 
42 namespace XERCES_CPP_NAMESPACE
43 {
44  class AttributeList;
45  class DocumentHandler;
46  class Locator;
47 }
48 
49 
50 
51 namespace XALAN_CPP_NAMESPACE {
52 
53 
54 
55 typedef xercesc::AttributeList AttributeListType;
56 typedef xercesc::DocumentHandler DocumentHandlerType;
57 
58 using xercesc::AttributeList;
59 using xercesc::DocumentHandler;
60 using xercesc::Locator;
61 
62 
63 
64 class AVT;
65 class AVTPart;
66 class ElemTemplate;
67 class ElemTemplateElement;
68 class ExtensionNSHandler;
69 class PrefixResolver;
70 class Stylesheet;
71 class StylesheetRoot;
72 class XalanDocument;
73 class XalanMatchPatternData;
74 class XalanNode;
75 class XSLTInputSource;
76 
77 
78 
79 //
80 // An abstract class which provides support for constructing the internal
81 // representation of a stylesheet.
82 //
84 {
85 public:
86 
88 
89  /**
90  * IDs for XSL element types. These are the values
91  * that must be returned by getElementToken().
92  */
94  {
95  ELEMNAME_UNDEFINED = -2,
96  ELEMNAME_EMPTY = -1,
126 
128 
131 
135 
136  // This one doesn't really have a name.
137  // It's used for any literal result
138  // element.
140 
141  // This one doesn't really have a name.
142  // It's used for any literal text in
143  // the content of a literal result
144  // element.
146 
147  // This one doesn't really have a name.
148  // It's used for forward-compatible
149  // processing.
151 
152  // Extension handling.
154  ELEMNAME_EXTENSION_HANDLER
155  };
156 
158 
159  explicit
160  StylesheetConstructionContext(MemoryManager& theManager);
161 
162  virtual
164 
165 
166  // These are inherited from XPathConstructionContext...
167  virtual void
169  eSource source,
170  eClassification classification,
171  const XalanDOMString& msg,
172  const Locator* locator,
173  const XalanNode* sourceNode) = 0;
174 
175  virtual void
177  eSource source,
178  eClassification classification,
179  const XalanDOMString& msg,
180  const XalanNode* sourceNode) = 0;
181 
182  virtual void
183  reset() = 0;
184 
185  virtual const XalanDOMString&
186  getPooledString(const XalanDOMString& theString) = 0;
187 
188  virtual const XalanDOMString&
190  const XalanDOMChar* theString,
191  XalanDOMString::size_type theLength = XalanDOMString::npos) = 0;
192 
193  virtual XalanDOMString&
195 
196  virtual bool
198 
199  /**
200  * Create a new StylesheetRoot instance. The StylesheetConstructionContext
201  * instance owns the StylesheetRoot instance, and will delete it when asked
202  * or when the StylesheetConstructionContext instance is destroyed.
203  *
204  * @param theBaseIdentifier A URI to the stylesheet file.
205  * @return A pointer to a new StylesheetRoot instance.
206  */
207  virtual StylesheetRoot*
208  create(const XalanDOMString& theBaseIdentifier) = 0;
209 
210  /**
211  * Create a new StylesheetRoot instance. The StylesheetConstructionContext
212  * instance owns the StylesheetRoot instance, and will delete it when asked
213  * or when the StylesheetConstructionContext instance is destroyed.
214  *
215  * @param theInputSource A reference to the input source.
216  * @return A pointer to a new StylesheetRoot instance.
217  */
218  virtual StylesheetRoot*
219  create(const XSLTInputSource& theInputSource) = 0;
220 
221  /**
222  * Create a new Stylesheet instance. The StylesheetConstructionContext
223  * instance owns the Stylesheet instance, and will delete it when asked
224  * or when the StylesheetConstructionContext instance is destroyed.
225  *
226  * @param A reference to the StylesheetRoot instance.
227  * @param theBaseIdentifier A URI to the stylesheet file.
228  * @return A pointer to a new StylesheetRoot instance.
229  */
230  virtual Stylesheet*
232  StylesheetRoot& theStylesheetRoot,
233  const XalanDOMString& theBaseIdentifier) = 0;
234 
235  /**
236  * Destroy a StylesheetRoot instance. If this StylesheetConstructionContext
237  * instance does not own the StylesheetRoot, it will not delete it
238  *
239  * @param theStylesheet A pointer to the StylesheetRoot instance to delete.
240  */
241  virtual void
242  destroy(StylesheetRoot* theStylesheetRoot) = 0;
243 
244  /**
245  * Determine the fully qualified URI for a string.
246  *
247  * @param urlString string to qualify
248  * @return auto pointer to fully qualified URI
249  */
250  virtual URLAutoPtrType
251  getURLFromString(const XalanDOMString& urlString) = 0;
252 
253  /**
254  * Determine the fully qualified URI for a string.
255  *
256  * @param urlString string to qualify
257  * @return string to fully qualified URI
258  */
259  virtual XalanDOMString&
261  const XalanDOMString& urlString,
262  XalanDOMString& theResult) = 0;
263 
264  /**
265  * Determine the fully qualified URI for a string.
266  *
267  * @param urlString string to qualify
268  * @param base base location for URI
269  * @return auto pointer to fully qualified URI
270  */
271  virtual URLAutoPtrType
273  const XalanDOMString& urlString,
274  const XalanDOMString& base) = 0;
275 
276  /**
277  * Determine the fully qualified URI for a string.
278  *
279  * @param urlString string to qualify
280  * @param base base location for URI
281  * @return string to fully qualified URI
282  */
283  virtual XalanDOMString&
285  const XalanDOMString& urlString,
286  const XalanDOMString& base,
287  XalanDOMString& theResult) = 0;
288 
289  /**
290  * Retrieve the URI for the current XSLT namespace, for example,
291  * "http://www.w3.org/1999/XSL/Transform"
292  *
293  * @return URI string
294  */
295  virtual const XalanDOMString&
296  getXSLTNamespaceURI() const = 0;
297 
298  /**
299  * Create and initialize an xpath for a match pattern and return it. This
300  * is to be used by stylesheet elements that need an XPath that is
301  * guaranteed to persist while it lives.
302  *
303  * @param locator the locator for the XPath. May be null.
304  * @param str string to match
305  * @param resolver resolver for namespace resolution
306  * @param allowVariableReferences If true, variable references are allowed.
307  * @param allowKeyFunction If true, calls to the key() function are allowed.
308  * @return XPath for match pattern
309  */
310  virtual XPath*
312  const Locator* locator,
313  const XalanDOMString& str,
314  const PrefixResolver& resolver,
315  bool allowVariableReferences = true,
316  bool allowKeyFunction = true) = 0;
317 
318  /**
319  * Create and initialize an xpath for a match pattern and return it. This
320  * is to be used by stylesheet elements that need an XPath that is
321  * guaranteed to persist while it lives.
322  *
323  * @param locator the locator for the XPath. May be null.
324  * @param str string to match
325  * @param resolver resolver for namespace resolution
326  * @param allowVariableReferences If true, variable references are allowed.
327  * @param allowKeyFunction If true, calls to the key() function are allowed.
328  * @return XPath for match pattern
329  */
330  virtual XPath*
332  const Locator* locator,
333  const XalanDOMChar* str,
334  const PrefixResolver& resolver,
335  bool allowVariableReferences = true,
336  bool allowKeyFunction = true) = 0;
337 
338  /**
339  * Create and initialize an xpath and return it. This is to be used by
340  * stylesheet elements that need an XPath that is guaranteed to persist
341  * while it lives.
342  *
343  * @param locator the locator for the XPath. May be null.
344  * @param str string to match
345  * @param resolver resolver for namespace resolution
346  * @return XPath for string matched
347  */
348  virtual XPath*
350  const Locator* locator,
351  const XalanDOMString& str,
352  const PrefixResolver& resolver,
353  bool allowVariableReferences = true,
354  bool allowKeyFunction = true) = 0;
355 
356  /**
357  * Create and initialize an xpath and return it. This is to be used by
358  * stylesheet elements that need an XPath that is guaranteed to persist
359  * while it lives.
360  *
361  * @param locator the locator for the XPath. May be null.
362  * @param str string to match
363  * @param resolver resolver for namespace resolution
364  * @return XPath for string matched
365  */
366  virtual XPath*
368  const Locator* locator,
369  const XalanDOMChar* str,
370  const PrefixResolver& resolver,
371  bool allowVariableReferences = true,
372  bool allowKeyFunction = true) = 0;
373 
374  /**
375  * Create and initialize an xpath and return it. This is to be used by
376  * stylesheet elements that need an XPath that is guaranteed to persist
377  * while it lives.
378  *
379  * @param locator the locator for the XPath. May be null.
380  * @param str string to match
381  * @param resolver resolver for namespace resolution
382  * @return XPath for string matched
383  */
384  virtual XPath*
386  const Locator* locator,
387  const XalanDOMChar* str,
389  const PrefixResolver& resolver,
390  bool allowVariableReferences = true,
391  bool allowKeyFunction = true) = 0;
392 
393  /**
394  * Get the locator from the top of the locator stack.
395  *
396  * @return A pointer to the Locator, or 0 if there is nothing on the stack.
397  */
398  virtual const Locator*
399  getLocatorFromStack() const = 0;
400 
401  /**
402  * Push a locator on to the locator stack.
403  *
404  * @param A pointer to the Locator to push.
405  */
406  virtual void
407  pushLocatorOnStack(const Locator* locator) = 0;
408 
409  /**
410  * Pop the locator from the top of the locator stack.
411  */
412  virtual void
414 
415  /**
416  * Get the Xalan namespace for built-in extensions.
417  *
418  * @return Xalan namespace for extensions
419  */
420  virtual const XalanDOMString&
422 
423  /**
424  * Read in the XML file, either producing a Document or calling SAX events,
425  * and register the document in a table. If the document has already been
426  * read in, it will not be reparsed.
427  *
428  * @param urlString location of the XML
429  * @param docHandler pointer to SAX event handler
430  * @param docToRegister if using a SAX event handler, the object to register in the source docs table.
431  * @return document object, which represents the parsed XML
432  * @exception SAXException
433  */
434  virtual XalanDocument*
436  const XalanDOMString& urlString,
437  DocumentHandler* docHandler,
438  XalanDocument* docToRegister,
439  ErrorHandler* theErrorHandler = 0) = 0;
440 
441  /**
442  * Given an name, determine if it is the xml:space attribute
443  *
444  * @param theAttributeName The name to check
445  * @param theStylesheet The current Stylesheet instance
446  * @param theLocator The Locator for error reporting. May be 0.
447  *
448  * @return true if the string is the xml:space attribute name
449  */
450  virtual bool
452  const XalanDOMChar* theAttributeName,
453  const Stylesheet& theStylesheet,
454  const Locator* theLocator = 0) = 0;
455 
456  /**
457  * Given an name, determine if it is the xsl:use-attribute-sets attribute
458  *
459  * @param theAttributeName The name to check
460  * @param theStylesheet The current Stylesheet instance
461  * @param theLocator The Locator for error reporting. May be 0.
462  *
463  * @return true if the string is the xsl:use-attribute-sets attribute name
464  */
465  virtual bool
467  const XalanDOMChar* theAttributeName,
468  const Stylesheet& theStylesheet,
469  const Locator* theLocator = 0) = 0;
470 
471  /**
472  * Given an name, determine if it is a valid QName
473  *
474  * @param theName The name to check
475  * @param theStylesheet The current Stylesheet instance
476  * @param theLocator The Locator for error reporting. May be 0.
477  *
478  * @return true if the string is a valid QName.
479  */
480  virtual bool
482  const XalanDOMChar* theName,
483  const Stylesheet& theStylesheet,
484  const Locator* theLocator = 0) = 0;
485 
486  /**
487  * Given an XSL tag name, return an integer token that corresponds to
488  * the enums defined above.
489  *
490  * @param name a probable xsl:xxx element
491  * @return The enum value for that token, or ELEMNAME_UNDEFINED
492  */
493  virtual eElementToken
494  getElementToken(const XalanDOMString& name) const = 0;
495 
496  /**
497  * Get the latest XSLT version currently supported.
498  *
499  * @return XSLT version number
500  */
501  virtual double
503 
504  /**
505  * Allocate a vector of XalanDOMChar of the specified
506  * size.
507  *
508  * @param theLength The length of the character vector
509  * @return A pointer to the vector.
510  */
511  virtual XalanDOMChar*
513 
514  /**
515  * Allocate a vector of XalanDOMChar of the specified
516  * size.
517  *
518  * @param theString The source character array
519  * @param theLength The length of the character vector
520  * @param fTerminate If true, terminate the new vector with 0
521  * @return A pointer to the array.
522  */
523  virtual XalanDOMChar*
525  const XalanDOMChar* theString,
526  XalanDOMString::size_type theLength = XalanDOMString::npos,
527  bool fTerminate = true) = 0;
528 
529  /**
530  * Create an AVT instance.
531  *
532  * @param locator the Locator for the instance. May be null.
533  * @param name name of AVT
534  * @param stringedValue string value to parse
535  * @param resolver resolver for namespace resolution
536  * @return A pointer to the instance.
537  */
538  virtual const AVT*
540  const Locator* locator,
541  const XalanDOMChar* name,
542  const XalanDOMChar* stringedValue,
543  const PrefixResolver& resolver) = 0;
544 
545  /**
546  * Create an AVTPart instance.
547  *
548  * @param theString The source character array
549  * @param theLength The length of the character vector
550  * @param fTerminate If true, terminate the new vector with 0
551  * @return A pointer to the instance.
552  */
553  virtual const AVTPart*
555  const XalanDOMChar* theString,
556  XalanDOMString::size_type theLength = XalanDOMString::npos) = 0;
557 
558  /**
559  * Create an AVTPart instance.
560  *
561  * @param locator the Locator for the instance. May be null.
562  * @param str The XPath expression for the instance
563  * @param len The length of the expression
564  * @param resolver resolver for namespace resolution
565  * @return A pointer to the instance.
566  */
567  virtual const AVTPart*
569  const Locator* locator,
570  const XalanDOMChar* str,
572  const PrefixResolver& resolver) = 0;
573 
574  /**
575  * Allocate a vector of const AVT* of the specified
576  * length.
577  *
578  * @param theLength The length of the vector
579  * @return A pointer to the vector.
580  */
581  virtual const AVT**
583 
584  /**
585  * Allocate a vector of const AVTPart* of the specified
586  * length.
587  *
588  * @param theLength The length of the vector
589  * @return A pointer to the vector.
590  */
591  virtual const AVTPart**
593 
594  /**
595  * Create a XalanQName-derived instance.
596  *
597  * @param qname The qname string
598  * @param namespaces The stack of namespaces
599  * @param Locator The current Locator, if any
600  * @param fUseDefault If true, a qname without a prefix will use the default namespace
601  * @return A pointer to the new instance
602  */
603  virtual const XalanQName*
605  const XalanDOMString& qname,
606  const NamespacesStackType& namespaces,
607  const Locator* locator = 0,
608  bool fUseDefault = false) = 0;
609 
610  /**
611  * Create a XalanQName-derived instance.
612  *
613  * @param qname The qname string
614  * @param namespaces The stack of namespaces
615  * @param Locator The current Locator, if any
616  * @param fUseDefault If true, a qname without a prefix will use the default namespace
617  * @return A pointer to the new instance
618  */
619  virtual const XalanQName*
621  const XalanDOMChar* qname,
622  const NamespacesStackType& namespaces,
623  const Locator* locator = 0,
624  bool fUseDefault = false) = 0;
625 
626  /**
627  * Tokenize a string and return the QNames corresponding to
628  * those tokens.
629  *
630  * @param count The number of namespaces in the vector returned
631  * @param qnameTokens The string to tokenize
632  * @param namespaces The stack of namespaces
633  * @param Locator The current Locator, if any
634  * @param fUseDefault If true, qnames without prefixes will use the default namespace
635  * @return The resulting vector of XalanQName instances.
636  */
637  virtual const XalanQName**
639  size_type& count,
640  const XalanDOMChar* qnameTokens,
641  const NamespacesStackType& namespaces,
642  const Locator* locator = 0,
643  bool fUseDefault = false) = 0;
644 
645  /**
646  * Create a stylesheet element for the provided type. The
647  * instance owns the memory and will delete the element when
648  * it goes out of scope and the containing stylesheet is
649  * destroyed.
650  *
651  * @param token The enum value of the element to create.
652  * @param stylesheetTree The stylesheet containing the element
653  * @param atts The list of attributes for the element
654  * @param locator The Locator instance for error reporting. May be 0.
655  *
656  * @return A pointer to the new instance.
657  */
658  virtual ElemTemplateElement*
660  int token,
661  Stylesheet& stylesheetTree,
662  const AttributeList& atts,
663  const Locator* locator = 0) = 0;
664 
665  /**
666  * Create a elements which have specific names. The instance
667  * owns the memory and will delete the element when it goes
668  * out of scope and the containing stylesheet is destroyed.
669  *
670  * @param token The enum value of the element to create.
671  * @param stylesheetTree The stylesheet containing the element
672  * @param name The name of the element
673  * @param atts The list of attributes for the element
674  * @param locator The Locator instance for error reporting. May be 0.
675  *
676  * @return A pointer to the new instance.
677  */
678  virtual ElemTemplateElement*
680  int token,
681  Stylesheet& stylesheetTree,
682  const XalanDOMChar* name,
683  const AttributeList& atts,
684  const Locator* locator = 0) = 0;
685 
686  /**
687  * Create a an element for literal text. The instance owns the
688  * memory and will delete the element when it goes out of
689  * scope and the containing stylesheet is destroyed.
690  *
691  * @param stylesheetTree The stylesheet containing the element
692  * @param chars The pointer to character string for element
693  * @param length length of the chars parameter.
694  * @param preserveSpace true is space should be preserved
695  * @param disableOutputEscaping true if output escaping should be disabled
696  * @param locator The Locator instance for error reporting. May be 0.
697  *
698  * @return A pointer to the new instance.
699  */
700  virtual ElemTemplateElement*
702  Stylesheet& stylesheetTree,
703  const XalanDOMChar* chars,
705  bool preserveSpace,
706  bool disableOutputEscaping,
707  const Locator* locator = 0) = 0;
708 
709  /**
710  * Create an element to handle an extension element. The
711  * instance owns the memory and will delete the element when
712  * it goes out of scope and the containing stylesheet is
713  * destroyed.
714  *
715  * @param stylesheetTree The stylesheet containing the element
716  * @param name The name of the element
717  * @param atts The list of attributes for the element
718  * @param handler The handler for elements in the extension namespace
719  * @param locator The Locator instance for error reporting. May be 0.
720  *
721  * @return A pointer to the new instance.
722  */
723  virtual ElemTemplateElement*
725  Stylesheet& stylesheetTree,
726  const XalanDOMChar* name,
727  const AttributeList& atts,
728  ExtensionNSHandler& handler,
729  const Locator* locator = 0) = 0;
730 
731  /**
732  * Create an instance of XalanMatchPatternData, which describes
733  * data related to a match pattern and template in stylesheet.
734  * The instance owns the memory and will delete the element when
735  * it goes out of scope and the containing stylesheet is
736  * destroyed.
737  *
738  * @param theTemplate The ElemTemplate node that contains the template for this pattern
739  * @param thePosition The position in the stylesheet
740  * @param theTargetString The target string for match pattern
741  * @param TheMatchPattern The match pattern
742  * @param thePatternString the pattern string
743  * @param thePriority The priority for the match pattern.
744  *
745  * @return A pointer to the new instance.
746  */
747  virtual const XalanMatchPatternData*
749  const ElemTemplate& theTemplate,
750  size_type thePosition,
751  const XalanDOMString& theTargetString,
752  const XPath& theMatchPattern,
753  const XalanDOMString& thePatternString,
754  XPath::eMatchScore thePriority) = 0;
755 };
756 
757 
758 
759 }
760 
761 
762 
763 #endif // STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680
#define XALAN_XSLT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Class to hold a part, either a string or XPath, of an Attribute Value Template.
Definition: AVTPart.hpp:44
Class to hold an Attribute Value Template.
Definition: AVT.hpp:59
This class defines an interface for classes that resolve namespace prefixes to their URIs.
virtual const AVT ** allocateAVTPointerVector(size_type theLength)=0
Allocate a vector of const AVT* of the specified length.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
virtual StylesheetRoot * create(const XSLTInputSource &theInputSource)=0
Create a new StylesheetRoot instance.
virtual XalanDOMString & getCachedString()=0
Get a cached string for temporary use.
virtual const XalanDOMString & getXSLTNamespaceURI() const =0
Retrieve the URI for the current XSLT namespace, for example, "http://www.w3.org/1999/XSL/Transform".
virtual const Locator * getLocatorFromStack() const =0
Get the locator from the top of the locator stack.
virtual const XalanDOMString & getPooledString(const XalanDOMString &theString)=0
Get a pooled string given the source string.
virtual ElemTemplateElement * createElement(Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeList &atts, ExtensionNSHandler &handler, const Locator *locator=0)=0
Create an element to handle an extension element.
XalanQName::NamespacesStackType NamespacesStackType
virtual void destroy(StylesheetRoot *theStylesheetRoot)=0
Destroy a StylesheetRoot instance.
virtual XPath * createXPath(const Locator *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
Create and initialize an xpath and return it.
virtual const XalanDOMString & getXalanXSLNameSpaceURL() const =0
Get the Xalan namespace for built-in extensions.
virtual XalanDocument * parseXML(const XalanDOMString &urlString, DocumentHandler *docHandler, XalanDocument *docToRegister, ErrorHandler *theErrorHandler=0)=0
Read in the XML file, either producing a Document or calling SAX events, and register the document in...
virtual const AVTPart * createAVTPart(const Locator *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver)=0
Create an AVTPart instance.
virtual const XalanQName * createXalanQName(const XalanDOMChar *qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)=0
Create a XalanQName-derived instance.
virtual const XalanMatchPatternData * createXalanMatchPatternData(const ElemTemplate &theTemplate, size_type thePosition, const XalanDOMString &theTargetString, const XPath &theMatchPattern, const XalanDOMString &thePatternString, XPath::eMatchScore thePriority)=0
Create an instance of XalanMatchPatternData, which describes data related to a match pattern and temp...
virtual XalanDOMChar * allocateXalanDOMCharVector(XalanDOMString::size_type theLength)=0
Allocate a vector of XalanDOMChar of the specified size.
virtual const AVTPart * createAVTPart(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
Create an AVTPart instance.
virtual const XalanQName * createXalanQName(const XalanDOMString &qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)=0
Create a XalanQName-derived instance.
virtual XPath * createMatchPattern(const Locator *locator, const XalanDOMString &str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
Create and initialize an xpath for a match pattern and return it.
virtual URLAutoPtrType getURLFromString(const XalanDOMString &urlString, const XalanDOMString &base)=0
Determine the fully qualified URI for a string.
StylesheetConstructionContext(MemoryManager &theManager)
virtual bool isXSLUseAttributeSetsAttribute(const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const Locator *theLocator=0)=0
Given an name, determine if it is the xsl:use-attribute-sets attribute.
virtual void popLocatorStack()=0
Pop the locator from the top of the locator stack.
virtual Stylesheet * create(StylesheetRoot &theStylesheetRoot, const XalanDOMString &theBaseIdentifier)=0
Create a new Stylesheet instance.
virtual XalanDOMChar * allocateXalanDOMCharVector(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos, bool fTerminate=true)=0
Allocate a vector of XalanDOMChar of the specified size.
virtual ElemTemplateElement * createElement(int token, Stylesheet &stylesheetTree, const AttributeList &atts, const Locator *locator=0)=0
Create a stylesheet element for the provided type.
virtual void pushLocatorOnStack(const Locator *locator)=0
Push a locator on to the locator stack.
virtual const XalanDOMString & getPooledString(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
Get a pooled string given the source character array.
virtual ElemTemplateElement * createElement(Stylesheet &stylesheetTree, const XalanDOMChar *chars, XalanDOMString::size_type length, bool preserveSpace, bool disableOutputEscaping, const Locator *locator=0)=0
Create a an element for literal text.
virtual XalanDOMString & getURLStringFromString(const XalanDOMString &urlString, XalanDOMString &theResult)=0
Determine the fully qualified URI for a string.
virtual const AVTPart ** allocateAVTPartPointerVector(size_type theLength)=0
Allocate a vector of const AVTPart* of the specified length.
virtual eElementToken getElementToken(const XalanDOMString &name) const =0
Given an XSL tag name, return an integer token that corresponds to the enums defined above.
virtual XPath * createMatchPattern(const Locator *locator, const XalanDOMChar *str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
Create and initialize an xpath for a match pattern and return it.
virtual bool isXMLSpaceAttribute(const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const Locator *theLocator=0)=0
Given an name, determine if it is the xml:space attribute.
virtual URLAutoPtrType getURLFromString(const XalanDOMString &urlString)=0
Determine the fully qualified URI for a string.
virtual const XalanQName ** tokenizeQNames(size_type &count, const XalanDOMChar *qnameTokens, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)=0
Tokenize a string and return the QNames corresponding to those tokens.
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.
virtual StylesheetRoot * create(const XalanDOMString &theBaseIdentifier)=0
Create a new StylesheetRoot instance.
virtual bool isValidQName(const XalanDOMChar *theName, const Stylesheet &theStylesheet, const Locator *theLocator=0)=0
Given an name, determine if it is a valid QName.
virtual const AVT * createAVT(const Locator *locator, const XalanDOMChar *name, const XalanDOMChar *stringedValue, const PrefixResolver &resolver)=0
Create an AVT instance.
virtual XalanDOMString & getURLStringFromString(const XalanDOMString &urlString, const XalanDOMString &base, XalanDOMString &theResult)=0
Determine the fully qualified URI for a string.
virtual double getXSLTVersionSupported() const =0
Get the latest XSLT version currently supported.
virtual ElemTemplateElement * createElement(int token, Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeList &atts, const Locator *locator=0)=0
Create a elements which have specific names.
virtual void reset()=0
Reset the instance.
virtual XPath * createXPath(const Locator *locator, const XalanDOMString &str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
Create and initialize an xpath and return it.
virtual XPath * createXPath(const Locator *locator, const XalanDOMChar *str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
Create and initialize an xpath and return it.
virtual bool releaseCachedString(XalanDOMString &theString)=0
Return a cached string.
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:87
Xalan implementation of deque.
Definition: XalanDeque.hpp:201
This class contains information concerning a match pattern in a stylesheet.
Class to represent a qualified name.
Definition: XalanQName.hpp:71
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
size_t size_type
Definition: XalanMap.hpp:46
xercesc::AttributeList AttributeListType
xercesc::DocumentHandler DocumentHandlerType