It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison, the DOM, and the XPath engine, to transform a source tree of nodes into a result tree according to instructions and templates specified by a stylesheet tree.
More...
#include <XSLTEngineImpl.hpp>
Inherits XSLTProcessor, and PrefixResolver.
List of all members.
Classes
Public Types
Public Member Functions
- XSLTEngineImpl (MemoryManager &theManager, XMLParserLiaison &parserLiaison, XPathEnvSupport &xpathEnvSupport, DOMSupport &domSupport, XObjectFactory &xobjectFactory, XPathFactory &xpathFactory)
- Construct an XSL processor that can call back to a XML processor, so it can handle included files, and the like.
- virtual ~XSLTEngineImpl ()
- MemoryManager & getMemoryManager () const
- MemoryManager & getMemoryManager ()
- virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
- virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
- virtual void process (const XSLTInputSource &inputSource, const XSLTInputSource &stylesheetSource, XSLTResultTarget &outputTarget, StylesheetConstructionContext &constructionContext, StylesheetExecutionContext &executionContext)
- virtual void process (const XSLTInputSource &inputSource, XSLTResultTarget &outputTarget, StylesheetExecutionContext &executionContext)
- virtual StylesheetRoot * processStylesheet (const XSLTInputSource &stylesheetSource, StylesheetConstructionContext &constructionContext)
- virtual StylesheetRoot * processStylesheet (const XalanDOMString &xsldocURLString, StylesheetConstructionContext &constructionContext)
- virtual XalanNode * getSourceTreeFromInput (const XSLTInputSource &inputSource)
- virtual void resolveTopLevelParams (StylesheetExecutionContext &executionContext)
- virtual XMLParserLiaison & getXMLParserLiaison () const
- virtual void getUniqueNamespaceValue (XalanDOMString &theValue)
- virtual void setStylesheetParam (const XalanDOMString &key, const XalanDOMString &expression)
- virtual void setStylesheetParam (const XalanDOMString &key, XObjectPtr value)
- virtual void clearStylesheetParams ()
- virtual FormatterListener * getFormatterListener () const
- virtual void setFormatterListener (FormatterListener *flistener)
- virtual size_type getTraceListeners () const
- virtual void addTraceListener (TraceListener *tl)
- virtual void removeTraceListener (TraceListener *tl)
- virtual void fireGenerateEvent (const GenerateEvent &ge)
- virtual void fireTraceEvent (const TracerEvent &te)
- virtual void fireSelectEvent (const SelectionEvent &se)
- virtual bool getTraceSelects () const
- virtual void setTraceSelects (bool b)
- void traceSelect (StylesheetExecutionContext &executionContext, const ElemTemplateElement &theTemplate, const NodeRefListBase &nl, const XPath *xpath) const
- virtual void setQuietConflictWarnings (bool b)
- virtual void setDiagnosticsOutput (PrintWriter *pw)
- virtual const XalanDOMString * getNamespaceForPrefix (const XalanDOMString &prefix) const
- Retrieve a namespace corresponding to a prefix.
- virtual const XalanDOMString & getURI () const
- Retrieve the base URI for the resolver.
- XalanDocument * parseXML (const XalanDOMString &urlString, DocumentHandler *docHandler, XalanDocument *docToRegister, ErrorHandler *theErrorHandler=0)
- Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.
- XalanDocument * parseXML (const InputSource &inputSource, DocumentHandler *docHandler, XalanDocument *docToRegister, ErrorHandler *theErrorHandler=0)
- Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.
- Stylesheet * getStylesheetFromPIURL (const XalanDOMString &xslURLString, XalanNode &fragBase, const XalanDOMString &xmlBaseIdent, bool isRoot, StylesheetConstructionContext &constructionContext)
- Reset the state of the XSL processor by reading in a new XSL stylesheet from a processing instruction.
- void flushPending ()
- Flush the pending element.
- void addResultNamespaceDecl (const XalanDOMString &prefix, const XalanDOMString &namespaceVal)
- Add a namespace declaration to the namespace stack.
- void addResultNamespaceDecl (const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, size_type len)
- Add a namespace declaration to the namespace stack.
- 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.
- 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.
- void addResultAttribute (AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, size_type theLength, bool fromCopy=false, const Locator *locator=0)
- Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
- 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.
- 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 reportDuplicateNamespaceNodeError (const XalanDOMString &theName, const Locator *locator)
- Report an error copying a duplicate namespace node.
- void setDocumentLocator (const Locator *locator)
- void startDocument ()
- void endDocument ()
- void startElement (const XalanDOMChar *name, AttributeListType &atts)
- void endElement (const XalanDOMChar *name)
- void characters (const XalanDOMChar *ch, size_type length)
- void ignorableWhitespace (const XalanDOMChar *ch, size_type length)
- void processingInstruction (const XalanDOMChar *target, const XalanDOMChar *data)
- void resetDocument ()
- void characters (const XalanDOMChar *ch, size_type start, size_type length)
- Receive notification of character data.
- void characters (const XalanNode &node)
- Send character data from the node to the result tree.
- void characters (const XObjectPtr &xobject)
- Send character data from an XObject to the result tree.
- void startElement (const XalanDOMChar *name)
- Receive notification of the beginning of an element with an empty attribute list.
- void charactersRaw (const XalanDOMChar *ch, size_type start, size_type length)
- Receive notification of character data.
- void charactersRaw (const XalanNode &node)
- Send raw character data from the node to the result tree.
- void charactersRaw (const XObjectPtr &xobject)
- Send raw character data from an XObject to the result tree.
- void comment (const XalanDOMChar *data)
- Called when a Comment is to be constructed.
- void entityReference (const XalanDOMChar *data)
- Receive notification of a entityReference.
- void cdata (const XalanDOMChar *ch, size_type start, size_type length)
- Receive notification of cdata.
- void cloneToResultTree (const XalanNode &node, bool cloneTextNodesOnly, const Locator *locator)
- Clone a node to the result tree.
- void cloneToResultTree (const XalanNode &node, XalanNode::NodeType nodeType, bool overrideStrip, bool shouldCloneAttributes, bool cloneTextNodesOnly, const Locator *locator)
- Clone a node to the result tree.
- void outputToResultTree (const XObject &value, bool outputTextNodesOnly, const Locator *locator)
- Output an object to the result tree by doing the right conversions.
- 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.
- void outputResultTreeFragment (const XalanDocumentFragment &theTree, bool outputTextNodesOnly, const Locator *locator)
- Given a result tree fragment, walk the tree and output it to the result stream.
- virtual const StylesheetRoot * getStylesheetRoot () const
- Retrieve the root stylesheet.
- virtual void setStylesheetRoot (const StylesheetRoot *theStylesheet)
- Set the root stylesheet.
- virtual void setExecutionContext (StylesheetExecutionContext *theExecutionContext)
- Set the execution context.
- bool getQuietConflictWarnings () const
- Whether to warn about pattern match conflicts.
- const XalanDOMString * getResultNamespaceForPrefix (const XalanDOMString &prefix) const
- Retrieve the result namespace corresponding to a prefix.
- const XalanDOMString * getResultPrefixForNamespace (const XalanDOMString &theNamespace) const
- Retrieve the result prefix corresponding to a namespace.
- bool isPendingResultPrefix (const XalanDOMString &thePrefix) const
- Determine whether or not a prefix is in use on the pending element or the pending attributes.
- double evalMatchPatternStr (const XalanDOMString &str, XalanNode *context, XPathExecutionContext &executionContext)
- Evaluate an xpath string and return the result as a numberic score.
- const XPath * createMatchPattern (const XalanDOMString &str, const PrefixResolver &resolver)
- Create and initialize an xpath and return it.
- void returnXPath (const XPath *xpath)
- Return the xpath created by createXPath() or createMatchPattern().
- void copyNamespaceAttributes (const XalanNode &src)
- Copy XMLNS: attributes in if not already in scope.
- const XObjectPtr evalXPathStr (const XalanDOMString &str, XPathExecutionContext &executionContext)
- Evaluate an xpath string and return the result.
- const XObjectPtr evalXPathStr (const XalanDOMString &str, XalanNode *contextNode, const PrefixResolver &prefixResolver, XPathExecutionContext &executionContext)
- Evaluate an xpath string and return the result.
- const XObjectPtr evalXPathStr (const XalanDOMString &str, XalanNode *contextNode, const XalanElement &prefixResolver, XPathExecutionContext &executionContext)
- Evaluate an xpath string and return the result.
- void copyAttributeToTarget (const XalanDOMString &attrName, const XalanDOMString &attrValue, AttributeListImpl &attrList)
- Copy an attribute to an AttributeListImpl.
- XPathFactory & getXPathFactory ()
- Get the factory for making xpaths.
- XPathProcessor & getXPathProcessor ()
- Get the XPath processor object.
- virtual void reset ()
- Reset the state.
- XPathEnvSupport & getXPathEnvSupport ()
- Retrieve the XPath environment support object.
- void setProblemListener (ProblemListener *l)
- Set the problem listener property.
- ProblemListener * getProblemListener () const
- Get the problem listener property.
- void pushOutputContext (FormatterListener *theListener)
- void popOutputContext ()
- bool getHasPendingStartDocument () const
- void setHasPendingStartDocument (bool b)
- bool getMustFlushPendingStartDocument () const
- void setMustFlushPendingStartDocument (bool b)
- const AttributeListType & getPendingAttributes () const
- Get the list of attributes yet to be processed.
- void setPendingAttributes (const AttributeListType &pendingAttributes)
- Set the list of attributes yet to be processed.
- void replacePendingAttribute (const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
- Replace the contents of a pending attribute.
- bool isElementPending () const
- const XalanDOMString & getPendingElementName () const
- Retrieve name of the pending element currently being processed.
- void setPendingElementName (const XalanDOMString &elementName)
- Changes the currently pending element name.
- void setPendingElementName (const XalanDOMChar *elementName)
- const Locator * getLocatorFromStack () const
- Get the locator from the top of the locator stack.
- void pushLocatorOnStack (const Locator *locator)
- Push a locator on to the locator stack.
- void popLocatorStack ()
- Pop the locator from the top of the locator stack.
- void clearTopLevelParams ()
- Reset the vector of top level parameters.
Static Public Member Functions
- static void initialize (MemoryManager &theManager)
- Perform initialization of statics -- must be called before any processing occurs.
- static void terminate ()
- Perform termination of statics.
- static const XalanDOMString & getXSLNameSpaceURL ()
- Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
- static const XalanDOMString & getXalanXSLNameSpaceURL ()
- Special Xalan namespace for built-in extensions.
Protected Member Functions
Protected Attributes
Detailed Description
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison, the DOM, and the XPath engine, to transform a source tree of nodes into a result tree according to instructions and templates specified by a stylesheet tree.
The process method is the primary public entry points.
If you reuse the processor instance, you should call reset() between calls.
Definition at line 128 of file XSLTEngineImpl.hpp.
Member Typedef Documentation
Constructor & Destructor Documentation
Construct an XSL processor that can call back to a XML processor, so it can handle included files, and the like.
You must create a new instance of the XSLTEngineImpl class each time you run a transformation.
- Parameters:
-
| XMLParserLiaison | liaison to an object that can help with a specific parser implementation |
| xpathEnvSupport | An XPathEnvSupport instance |
| domSupport | A DOMSupport instance for the DOM being used |
| xobjectFactory | object responsible for XObject objects |
| xpathFactory | object responsible for XPath objects |
virtual XSLTEngineImpl::~XSLTEngineImpl |
( |
|
) |
[virtual] |
Member Function Documentation
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
- Parameters:
-
| attList | attribute list added to |
| aname | name of attribute |
| value | value of attribute |
| fromCopy | true if the attribute is being copied from the source tree |
| locator | The Locator for reporting errors. |
Definition at line 481 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::addResultAttribute |
( |
AttributeListImpl & |
attList, |
|
|
const XalanDOMString & |
aname, |
|
|
const XalanDOMChar * |
value, |
|
|
bool |
fromCopy = false , |
|
|
const Locator * |
locator = 0 | |
|
) |
| | [inline] |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
- Parameters:
-
| attList | attribute list added to |
| aname | name of attribute |
| value | value of attribute |
| fromCopy | true if the attribute is being copied from the source tree |
| locator | The Locator for reporting errors. |
Definition at line 507 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::addResultAttribute |
( |
AttributeListImpl & |
attList, |
|
|
const XalanDOMString & |
aname, |
|
|
const XalanDOMChar * |
value, |
|
|
size_type |
theLength, |
|
|
bool |
fromCopy = false , |
|
|
const Locator * |
locator = 0 | |
|
) |
| | |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
- Parameters:
-
| attList | attribute list added to |
| aname | name of attribute |
| value | value of attribute |
| theLength | The length of the value |
| fromCopy | true if the attribute is being copied from the source tree |
| locator | The Locator for reporting errors. |
void XSLTEngineImpl::addResultAttribute |
( |
const XalanDOMString & |
aname, |
|
|
const XalanDOMChar * |
value, |
|
|
bool |
fromCopy = false , |
|
|
const Locator * |
locator = 0 | |
|
) |
| | [inline] |
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
- Parameters:
-
| aname | name of attribute |
| value | value of attribute |
| fromCopy | true if the attribute is being copied from the source tree |
| locator | The Locator for reporting errors. |
Definition at line 553 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::addResultAttribute |
( |
const XalanDOMString & |
aname, |
|
|
const XalanDOMString & |
value, |
|
|
bool |
fromCopy = false , |
|
|
const Locator * |
locator = 0 | |
|
) |
| | [inline] |
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
- Parameters:
-
| aname | name of attribute |
| value | value of attribute |
| fromCopy | true if the attribute is being copied from the source tree |
| locator | The Locator for reporting errors. |
Definition at line 579 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::addResultNamespaceDecl |
( |
const XalanDOMString & |
prefix, |
|
|
const XalanDOMChar * |
namespaceVal, |
|
|
size_type |
len | |
|
) |
| | [inline] |
Add a namespace declaration to the namespace stack.
- Parameters:
-
| prefix | namespace prefix |
| namespaceVal | value of namespace |
| len | length of namespace |
Definition at line 459 of file XSLTEngineImpl.hpp.
Add a namespace declaration to the namespace stack.
- Parameters:
-
| prefix | namespace prefix |
| namespaceVal | value of namespace |
Definition at line 441 of file XSLTEngineImpl.hpp.
virtual void XSLTEngineImpl::addTraceListener |
( |
TraceListener * |
tl |
) |
[virtual] |
Receive notification of cdata.
- Parameters:
-
| ch | pointer to characters from the XML document |
| start | start position in the array |
| length | number of characters to read from the array |
void XSLTEngineImpl::characters |
( |
const XalanDOMChar * |
ch, |
|
|
size_type |
start, |
|
|
size_type |
length | |
|
) |
| | |
Receive notification of character data.
- Parameters:
-
| ch | pointer to characters from the XML document |
| start | startng offset in 'ch' array |
| length | number of characters to read from the array |
void XSLTEngineImpl::characters |
( |
const XalanNode & |
node |
) |
|
Send character data from the node to the result tree.
- Parameters:
-
void XSLTEngineImpl::characters |
( |
const XalanDOMChar * |
ch, |
|
|
size_type |
length | |
|
) |
| | |
void XSLTEngineImpl::characters |
( |
const XObjectPtr & |
xobject |
) |
|
Send character data from an XObject to the result tree.
- Parameters:
-
| node | The xobject to send. |
void XSLTEngineImpl::charactersRaw |
( |
const XalanDOMChar * |
ch, |
|
|
size_type |
start, |
|
|
size_type |
length | |
|
) |
| | |
Receive notification of character data.
If available, when the disable-output-escaping attribute is used, output raw text without escaping.
- Parameters:
-
| ch | pointer to characters from the XML document |
| start | start position in the array |
| length | number of characters to read from the array |
void XSLTEngineImpl::charactersRaw |
( |
const XalanNode & |
node |
) |
|
Send raw character data from the node to the result tree.
- Parameters:
-
void XSLTEngineImpl::charactersRaw |
( |
const XObjectPtr & |
xobject |
) |
|
Send raw character data from an XObject to the result tree.
- Parameters:
-
| node | The xobject to send. |
virtual void XSLTEngineImpl::clearStylesheetParams |
( |
|
) |
[virtual] |
void XSLTEngineImpl::clearTopLevelParams |
( |
|
) |
[inline] |
void XSLTEngineImpl::cloneToResultTree |
( |
const XalanNode & |
node, |
|
|
bool |
cloneTextNodesOnly, |
|
|
const Locator * |
locator | |
|
) |
| | |
Clone a node to the result tree.
- Parameters:
-
| node | node to clone |
| cloneTextNodesOnly | if true, only text nodes will be cloned |
| locator | the Locator for the event, if any. |
void XSLTEngineImpl::cloneToResultTree |
( |
const XalanNode & |
node, |
|
|
XalanNode::NodeType |
nodeType, |
|
|
bool |
overrideStrip, |
|
|
bool |
shouldCloneAttributes, |
|
|
bool |
cloneTextNodesOnly, |
|
|
const Locator * |
locator | |
|
) |
| | |
Clone a node to the result tree.
- Parameters:
-
| node | node to clone |
| nodeType | the type of the node |
| overrideStrip | false if white space stripping should be done |
| shouldCloneAttributes | true if attributes should be cloned |
| cloneTextNodesOnly | if true, only text nodes will be cloned |
| locator | the Locator for the event, if any. |
void XSLTEngineImpl::comment |
( |
const XalanDOMChar * |
data |
) |
|
Called when a Comment is to be constructed.
- Parameters:
-
| data | pointer to comment data |
Copy the attributes from the XSL element to the created output element.
Copy an attribute to an AttributeListImpl.
- Parameters:
-
| attrName | The name of the attribute |
| attrValue | The value of the attribute |
| attrList | The attribute list added to |
void XSLTEngineImpl::copyNamespaceAttributes |
( |
const XalanNode & |
src |
) |
|
Copy XMLNS: attributes in if not already in scope.
- Parameters:
-
Create and initialize an xpath and return it.
- Parameters:
-
| str | string for XPath |
| resolver | resolver for namespace resolution |
- Returns:
- pointer to XPath created
void XSLTEngineImpl::endDocument |
( |
|
) |
|
void XSLTEngineImpl::endElement |
( |
const XalanDOMChar * |
name |
) |
|
void XSLTEngineImpl::entityReference |
( |
const XalanDOMChar * |
data |
) |
|
Receive notification of a entityReference.
- Parameters:
-
| data | pointer to characters from the XML document |
- Exceptions:
-
Evaluate an xpath string and return the result as a numberic score.
- Parameters:
-
| str | string to evaluate |
| context | context node |
| executionContext | current execution context |
- Returns:
- score number, higher representing better match
Evaluate an xpath string and return the result.
- Parameters:
-
| str | string to evaluate |
| executionContext | current execution context |
- Returns:
- pointer to XObject result
Evaluate an xpath string and return the result.
- Parameters:
-
| str | string to evaluate |
| contextNode | context node |
| prefixResolver | prefix resolver to use |
| executionContext | current execution context |
- Returns:
- pointer to XObject result
Evaluate an xpath string and return the result.
- Parameters:
-
| str | string to evaluate |
| contextNode | context node |
| prefixResolver | prefix resolver to use |
| executionContext | current execution context |
- Returns:
- pointer to XObject result
virtual void XSLTEngineImpl::fireGenerateEvent |
( |
const GenerateEvent & |
ge |
) |
[virtual] |
virtual void XSLTEngineImpl::fireSelectEvent |
( |
const SelectionEvent & |
se |
) |
[virtual] |
virtual void XSLTEngineImpl::fireTraceEvent |
( |
const TracerEvent & |
te |
) |
[virtual] |
void XSLTEngineImpl::flushPending |
( |
|
) |
|
Flush the pending element.
FormatterListener* XSLTEngineImpl::getFormatterListenerImpl |
( |
|
) |
const [inline, protected] |
bool XSLTEngineImpl::getHasPendingStartDocument |
( |
|
) |
const [inline] |
bool XSLTEngineImpl::getHasPendingStartDocumentImpl |
( |
|
) |
const [inline, protected] |
const Locator* XSLTEngineImpl::getLocatorFromStack |
( |
|
) |
const [inline] |
Get the locator from the top of the locator stack.
- Returns:
- A pointer to the Locator, or 0 if there is nothing on the stack.
Definition at line 1213 of file XSLTEngineImpl.hpp.
MemoryManager& XSLTEngineImpl::getMemoryManager |
( |
|
) |
const [inline] |
MemoryManager& XSLTEngineImpl::getMemoryManager |
( |
|
) |
[inline] |
bool XSLTEngineImpl::getMustFlushPendingStartDocument |
( |
|
) |
const [inline] |
bool XSLTEngineImpl::getMustFlushPendingStartDocumentImpl |
( |
|
) |
const [inline, protected] |
Retrieve a namespace corresponding to a prefix.
This assumes that the PrevixResolver hold's its own namespace context, or is a namespace context itself.
- Parameters:
-
- Returns:
- namespace that prefix resolves to, or null if prefix is not found
Implements PrefixResolver.
Get the list of attributes yet to be processed.
- Returns:
- attribute list
Definition at line 1139 of file XSLTEngineImpl.hpp.
const AttributeListImpl& XSLTEngineImpl::getPendingAttributesImpl |
( |
|
) |
const [inline, protected] |
Get the list of attributes yet to be processed.
- Returns:
- attribute list
Definition at line 1249 of file XSLTEngineImpl.hpp.
Get the list of attributes yet to be processed.
- Returns:
- attribute list
Definition at line 1260 of file XSLTEngineImpl.hpp.
const XalanDOMString& XSLTEngineImpl::getPendingElementName |
( |
|
) |
const [inline] |
Retrieve name of the pending element currently being processed.
- Returns:
- element name
Definition at line 1185 of file XSLTEngineImpl.hpp.
const XalanDOMString& XSLTEngineImpl::getPendingElementNameImpl |
( |
|
) |
const [inline, protected] |
Retrieve name of the pending element currently being processed.
- Returns:
- element name
Definition at line 1282 of file XSLTEngineImpl.hpp.
XalanDOMString& XSLTEngineImpl::getPendingElementNameImpl |
( |
|
) |
[inline, protected] |
Retrieve name of the pending element currently being processed.
- Returns:
- element name
Definition at line 1293 of file XSLTEngineImpl.hpp.
Get the problem listener property.
The XSL class can have a single listener that can be informed of errors and warnings, and can normally control if an exception is thrown or not (or the problem listeners can throw their own RuntimeExceptions).
- Returns:
- pointer to ProblemListener interface
Definition at line 1068 of file XSLTEngineImpl.hpp.
bool XSLTEngineImpl::getQuietConflictWarnings |
( |
|
) |
const [inline] |
Whether to warn about pattern match conflicts.
- Returns:
- true to not warn about pattern match conflicts
Definition at line 871 of file XSLTEngineImpl.hpp.
Retrieve the result namespace corresponding to a prefix.
- Parameters:
-
| prefix | prefix for namespace |
- Returns:
- string for namespace URI
Retrieve the result prefix corresponding to a namespace.
- Parameters:
-
| theNamespace | namespace for prefix |
- Returns:
- string for namespace prefix
Reset the state of the XSL processor by reading in a new XSL stylesheet from a processing instruction.
- Parameters:
-
| xslURLString | valid URI to an XSL stylesheet |
| fragBase | base of tree if URI represents document fragment |
| xmlBaseIdent | base identifier for stylesheet URI |
| isRoot | true if stylesheet is root of tree |
| constructionContext | context for construction of object |
- Returns:
- pointer to stylesheet
virtual const StylesheetRoot* XSLTEngineImpl::getStylesheetRoot |
( |
|
) |
const [virtual] |
Retrieve the root stylesheet.
- Returns:
- pointer to root stylesheet
virtual size_type XSLTEngineImpl::getTraceListeners |
( |
|
) |
const [virtual] |
virtual bool XSLTEngineImpl::getTraceSelects |
( |
|
) |
const [virtual] |
virtual void XSLTEngineImpl::getUniqueNamespaceValue |
( |
XalanDOMString & |
theValue |
) |
[virtual] |
virtual const XalanDOMString& XSLTEngineImpl::getURI |
( |
|
) |
const [virtual] |
Retrieve the base URI for the resolver.
- Returns:
- URI string
Implements PrefixResolver.
static const XalanDOMString& XSLTEngineImpl::getXalanXSLNameSpaceURL |
( |
|
) |
[inline, static] |
Special Xalan namespace for built-in extensions.
- Returns:
- Xalan namespace for extensions
Definition at line 860 of file XSLTEngineImpl.hpp.
virtual XMLParserLiaison& XSLTEngineImpl::getXMLParserLiaison |
( |
|
) |
const [virtual] |
static const XalanDOMString& XSLTEngineImpl::getXSLNameSpaceURL |
( |
|
) |
[inline, static] |
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
- Returns:
- URI string
Definition at line 849 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::ignorableWhitespace |
( |
const XalanDOMChar * |
ch, |
|
|
size_type |
length | |
|
) |
| | |
static void XSLTEngineImpl::initialize |
( |
MemoryManager & |
theManager |
) |
[static] |
Perform initialization of statics -- must be called before any processing occurs.
See class XSLTInit.
bool XSLTEngineImpl::isElementPending |
( |
|
) |
const [inline] |
bool XSLTEngineImpl::isPendingResultPrefix |
( |
const XalanDOMString & |
thePrefix |
) |
const |
Determine whether or not a prefix is in use on the pending element or the pending attributes.
- Parameters:
-
| thePrefix | prefix for namespace |
- Returns:
- true if the prefix is in use, false if not.
void XSLTEngineImpl::outputResultTreeFragment |
( |
const XObject & |
theTree, |
|
|
bool |
outputTextNodesOnly, |
|
|
const Locator * |
locator | |
|
) |
| | [inline] |
Given a result tree fragment, walk the tree and output it to the result stream.
- Parameters:
-
| theTree | result tree fragment |
| outputTextNodesOnly | if true, only text nodes will be copied |
| locator | the Locator for the event, if any. |
Definition at line 793 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::outputResultTreeFragment |
( |
const XalanDocumentFragment & |
theTree, |
|
|
bool |
outputTextNodesOnly, |
|
|
const Locator * |
locator | |
|
) |
| | |
Given a result tree fragment, walk the tree and output it to the result stream.
- Parameters:
-
| theTree | result tree fragment |
| outputTextNodesOnly | if true, only text nodes will be copied |
| locator | the Locator for the event, if any. |
void XSLTEngineImpl::outputToResultTree |
( |
const XObject & |
value, |
|
|
bool |
outputTextNodesOnly, |
|
|
const Locator * |
locator | |
|
) |
| | |
Output an object to the result tree by doing the right conversions.
- Parameters:
-
| value | the XObject to output |
| outputTextNodesOnly | if true, only text nodes will be copied |
| locator | the Locator for the event, if any. |
Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.
If the document has already been read in, it will not be reparsed.
- Parameters:
-
| urlString | location of the XML |
| docHandler | pointer to SAX event handler |
| docToRegister | if using a SAX event handler, the object to register in the source docs table. |
- Returns:
- document object, which represents the parsed XML
- Exceptions:
-
XalanDocument* XSLTEngineImpl::parseXML |
( |
const InputSource & |
inputSource, |
|
|
DocumentHandler * |
docHandler, |
|
|
XalanDocument * |
docToRegister, |
|
|
ErrorHandler * |
theErrorHandler = 0 | |
|
) |
| | |
Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.
If the document has already been read in, it will not be reparsed.
- Parameters:
-
| inputSource | location of the XML |
| docHandler | pointer to SAX event handler |
| docToRegister | if using a SAX event handler, the object to register in the source docs table. |
- Returns:
- document object, which represents the parsed XML
- Exceptions:
-
void XSLTEngineImpl::popLocatorStack |
( |
|
) |
[inline] |
void XSLTEngineImpl::popOutputContext |
( |
|
) |
[inline] |
void XSLTEngineImpl::processingInstruction |
( |
const XalanDOMChar * |
target, |
|
|
const XalanDOMChar * |
data | |
|
) |
| | |
void XSLTEngineImpl::pushLocatorOnStack |
( |
const Locator * |
locator |
) |
[inline] |
Push a locator on to the locator stack.
- Parameters:
-
| A | pointer to the Locator to push. |
Definition at line 1224 of file XSLTEngineImpl.hpp.
virtual void XSLTEngineImpl::removeTraceListener |
( |
TraceListener * |
tl |
) |
[virtual] |
void XSLTEngineImpl::replacePendingAttribute |
( |
const XalanDOMChar * |
theName, |
|
|
const XalanDOMChar * |
theNewType, |
|
|
const XalanDOMChar * |
theNewValue | |
|
) |
| | [inline] |
Replace the contents of a pending attribute.
- Parameters:
-
| theName | name of attribute |
| theNewType | type of attribute |
| theNewValue | new value of attribute |
Definition at line 1163 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::reportDuplicateNamespaceNodeError |
( |
const XalanDOMString & |
theName, |
|
|
const Locator * |
locator | |
|
) |
| | |
Report an error copying a duplicate namespace node.
- Parameters:
-
| theName | The name of the node. |
virtual void XSLTEngineImpl::reset |
( |
|
) |
[virtual] |
Reset the state.
This needs to be called after a process() call is invoked, if the processor is to be used again.
void XSLTEngineImpl::resetDocument |
( |
|
) |
|
void XSLTEngineImpl::returnXPath |
( |
const XPath * |
xpath |
) |
|
virtual void XSLTEngineImpl::setDiagnosticsOutput |
( |
PrintWriter * |
pw |
) |
[virtual] |
void XSLTEngineImpl::setDocumentLocator |
( |
const Locator * |
locator |
) |
|
Set the execution context.
- Parameters:
-
| theExecutionContext | pointer to new execution context. |
virtual void XSLTEngineImpl::setFormatterListener |
( |
FormatterListener * |
flistener |
) |
[virtual] |
void XSLTEngineImpl::setFormatterListenerImpl |
( |
FormatterListener * |
flistener |
) |
[inline, protected] |
void XSLTEngineImpl::setHasPendingStartDocument |
( |
bool |
b |
) |
[inline] |
void XSLTEngineImpl::setHasPendingStartDocumentImpl |
( |
bool |
b |
) |
[inline, protected] |
void XSLTEngineImpl::setMustFlushPendingStartDocument |
( |
bool |
b |
) |
[inline] |
void XSLTEngineImpl::setMustFlushPendingStartDocumentImpl |
( |
bool |
b |
) |
[inline, protected] |
void XSLTEngineImpl::setPendingAttributes |
( |
const AttributeListType & |
pendingAttributes |
) |
[inline] |
Set the list of attributes yet to be processed.
- Parameters:
-
| pendingAttributes | The attribute list |
Definition at line 1150 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::setPendingAttributesImpl |
( |
const AttributeListType & |
pendingAttributes |
) |
[inline, protected] |
Set the list of attributes yet to be processed.
- Parameters:
-
| pendingAttributes | The attribute list |
Definition at line 1271 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::setPendingElementName |
( |
const XalanDOMChar * |
elementName |
) |
[inline] |
void XSLTEngineImpl::setPendingElementName |
( |
const XalanDOMString & |
elementName |
) |
[inline] |
Changes the currently pending element name.
- Parameters:
-
| elementName | new name of element |
Definition at line 1196 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::setPendingElementNameImpl |
( |
const XalanDOMString & |
elementName |
) |
[inline, protected] |
Changes the currently pending element name.
- Parameters:
-
| elementName | new name of element |
Definition at line 1304 of file XSLTEngineImpl.hpp.
void XSLTEngineImpl::setPendingElementNameImpl |
( |
const XalanDOMChar * |
elementName |
) |
[inline, protected] |
Changes the currently pending element name.
- Parameters:
-
| elementName | new name of element |
Definition at line 1315 of file XSLTEngineImpl.hpp.
Set the problem listener property.
The XSL class can have a single listener that can be informed of errors and warnings, and can normally control if an exception is thrown or not (or the problem listeners can throw their own RuntimeExceptions).
- Parameters:
-
Definition at line 1054 of file XSLTEngineImpl.hpp.
virtual void XSLTEngineImpl::setQuietConflictWarnings |
( |
bool |
b |
) |
[virtual] |
virtual void XSLTEngineImpl::setStylesheetRoot |
( |
const StylesheetRoot * |
theStylesheet |
) |
[virtual] |
Set the root stylesheet.
- Parameters:
-
| theStylesheet | pointer to new root stylesheet |
virtual void XSLTEngineImpl::setTraceSelects |
( |
bool |
b |
) |
[virtual] |
void XSLTEngineImpl::startDocument |
( |
|
) |
|
void XSLTEngineImpl::startElement |
( |
const XalanDOMChar * |
name, |
|
|
AttributeListType & |
atts | |
|
) |
| | |
void XSLTEngineImpl::startElement |
( |
const XalanDOMChar * |
name |
) |
|
Receive notification of the beginning of an element with an empty attribute list.
- Parameters:
-
static void XSLTEngineImpl::terminate |
( |
|
) |
[static] |
Perform termination of statics.
See class XSLTInit.
Member Data Documentation
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text.
Definition at line 1410 of file XSLTEngineImpl.hpp.
The namespace that the result tree conforms to.
A null value indicates that result-ns is not used and there is no checking. A empty string indicates that the result tree conforms to the default namespace.
Definition at line 1380 of file XSLTEngineImpl.hpp.
The documentation for this class was generated from the following file: