Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Public Types | Public Member Functions | Protected Member Functions | List of all members
XalanSourceTreeParserLiaison Class Reference
Inheritance diagram for XalanSourceTreeParserLiaison:
XMLParserLiaison

Public Types

typedef XalanMap< const
XalanDocument
*, XalanSourceTreeDocument * > 
DocumentMapType

Public Member Functions

 XalanSourceTreeParserLiaison (XalanSourceTreeDOMSupport &theSupport, MemoryManagerType &theManager XALAN_DEFAULT_MEMMGR)
 Construct a XalanSourceTreeParserLiaison instance.
 XalanSourceTreeParserLiaison (MemoryManagerType &theManager XALAN_DEFAULT_MEMMGR)
 Construct a XalanSourceTreeParserLiaison instance.
MemoryManagerTypegetMemoryManager ()
virtual ~XalanSourceTreeParserLiaison ()
bool getPoolAllText () const
 Get the value of the flag which determines if the data of all text nodes are pooled, or just whitespace text nodes.
void setPoolAllText (bool fValue)
 Set the value of the flag which determines if the data of all text nodes are pooled, or just whitespace text nodes.
virtual void reset ()
virtual ExecutionContextgetExecutionContext () const
virtual void setExecutionContext (ExecutionContext &theContext)
virtual XalanDocumentparseXMLStream (const InputSourceType &reader, const XalanDOMString &identifier=XalanDOMString(XalanMemMgrs::getDummyMemMgr()))
 Parse the text pointed at by the reader as XML, and return a DOM Document interface.
virtual void parseXMLStream (const InputSourceType &inputSource, DocumentHandlerType &handler, const XalanDOMString &identifier=XalanDOMString(XalanMemMgrs::getDummyMemMgr()))
 Parse the text pointed at by the reader as XML.
virtual void destroyDocument (XalanDocument *theDocument)
 Destroy the supplied XalanDocument instance.
virtual int getIndent () const
 Get the amount to indent when indent-result="yes".
virtual void setIndent (int i)
 Set the amount to indent when indent-result="yes".
virtual bool getUseValidation () const
 Get whether or not validation will be performed.
virtual void setUseValidation (bool b)
 If set to true, validation will be performed.
virtual const XalanDOMStringgetParserDescription (XalanDOMString &theResult) const
 Return a string suitable for telling the user what parser is being used.
virtual EntityResolverTypegetEntityResolver () const
 This method returns the installed entity resolver.
virtual void setEntityResolver (EntityResolverType *resolver)
 This method installs the user specified entity resolver on the parser.
virtual void parseXMLStream (const InputSourceType &theInputSource, ContentHandlerType &theContentHandler, const XalanDOMString &theIdentifier, DTDHandlerType *theDTDHandler=0, LexicalHandlerType *theLexicalHandler=0)
 Parse using a SAX2 ContentHandler, DTDHandler, and LexicalHandler.
virtual DOMDocument_TypecreateDOMFactory ()
virtual void destroyDocument (DOMDocument_Type *theDocument)
virtual bool getIncludeIgnorableWhitespace () const
 Get the 'include ignorable whitespace' flag.
virtual void setIncludeIgnorableWhitespace (bool include)
 Set the 'include ignorable whitespace' flag.
virtual ErrorHandlerTypegetErrorHandler () const
 This method returns the installed error handler.
virtual void setErrorHandler (ErrorHandlerType *handler)
 This method installs the user specified error handler on the parser.
virtual bool getDoNamespaces () const
 This method returns the state of the parser's namespace handling capability.
virtual void setDoNamespaces (bool newState)
 This method allows users to enable or disable the parser's namespace processing.
virtual bool getExitOnFirstFatalError () const
 This method returns the state of the parser's exit-on-First-Fatal-Error flag.
virtual void setExitOnFirstFatalError (bool newState)
 This method allows users to set the parser's behaviour when it encounters the first fatal error.
virtual const XalanDOMChar * getExternalSchemaLocation () const
 This method returns the location for an external schema document for parsing.
virtual void setExternalSchemaLocation (const XalanDOMChar *location)
 This method sets the location for an external schema document for parsing.
virtual const XalanDOMChar * getExternalNoNamespaceSchemaLocation () const
 This method returns the location for an external schema document for parsing.
virtual void setExternalNoNamespaceSchemaLocation (const XalanDOMChar *location)
 This method sets the location for an external schema document for parsing.
XalanSourceTreeDocumentmapDocument (const XalanDocument *theDocument) const
 Map a pointer to a XalanDocument instance to its implementation class pointer.
XalanSourceTreeDocumentcreateXalanSourceTreeDocument ()
 Create a XalanSourceTreeDocument instance.
- Public Member Functions inherited from XMLParserLiaison
 XMLParserLiaison ()
virtual ~XMLParserLiaison ()

Protected Member Functions

virtual SAX2XMLReaderTypecreateReader ()

Member Typedef Documentation

Constructor & Destructor Documentation

XalanSourceTreeParserLiaison::XalanSourceTreeParserLiaison ( XalanSourceTreeDOMSupport theSupport,
MemoryManagerType &theManager  XALAN_DEFAULT_MEMMGR 
)

Construct a XalanSourceTreeParserLiaison instance.

Parameters
theSupportinstance of DOMSupport object
Deprecated:
This constructor is deprecated. Use the next constructor instead.
XalanSourceTreeParserLiaison::XalanSourceTreeParserLiaison ( MemoryManagerType &theManager  XALAN_DEFAULT_MEMMGR)

Construct a XalanSourceTreeParserLiaison instance.

virtual XalanSourceTreeParserLiaison::~XalanSourceTreeParserLiaison ( )
virtual

Member Function Documentation

virtual DOMDocument_Type* XalanSourceTreeParserLiaison::createDOMFactory ( )
virtual
virtual SAX2XMLReaderType* XalanSourceTreeParserLiaison::createReader ( )
protectedvirtual
XalanSourceTreeDocument* XalanSourceTreeParserLiaison::createXalanSourceTreeDocument ( )

Create a XalanSourceTreeDocument instance.

Returns
A pointer to the XalanSourceTreeDocument instance.
virtual void XalanSourceTreeParserLiaison::destroyDocument ( XalanDocument theDocument)
virtual

Destroy the supplied XalanDocument instance.

It must be an instance that was created by a previous call to parseXMLStream().

Parameters
theDocumentThe XalanDocument instance to destroy.

Implements XMLParserLiaison.

virtual void XalanSourceTreeParserLiaison::destroyDocument ( DOMDocument_Type theDocument)
virtual
virtual bool XalanSourceTreeParserLiaison::getDoNamespaces ( ) const
virtual

This method returns the state of the parser's namespace handling capability.

Returns
true, if the parser is currently configured to understand namespaces, false otherwise.
See Also
setDoNamespaces
virtual EntityResolverType* XalanSourceTreeParserLiaison::getEntityResolver ( ) const
virtual

This method returns the installed entity resolver.

Returns
The pointer to the installed entity resolver object.

Implements XMLParserLiaison.

virtual ErrorHandlerType* XalanSourceTreeParserLiaison::getErrorHandler ( ) const
virtual

This method returns the installed error handler.

Returns
A pointer to the installed error handler object.

Implements XMLParserLiaison.

virtual ExecutionContext* XalanSourceTreeParserLiaison::getExecutionContext ( ) const
virtual

Implements XMLParserLiaison.

virtual bool XalanSourceTreeParserLiaison::getExitOnFirstFatalError ( ) const
virtual

This method returns the state of the parser's exit-on-First-Fatal-Error flag.

Returns
true, if the parser is currently configured to exit on the first fatal error, false otherwise.
See Also
setExitOnFirstFatalError
virtual const XalanDOMChar* XalanSourceTreeParserLiaison::getExternalNoNamespaceSchemaLocation ( ) const
virtual

This method returns the location for an external schema document for parsing.

Returns
A string representing the location of the external schema document
virtual const XalanDOMChar* XalanSourceTreeParserLiaison::getExternalSchemaLocation ( ) const
virtual

This method returns the location for an external schema document for parsing.

Returns
A string representing the location of the external schema document
virtual bool XalanSourceTreeParserLiaison::getIncludeIgnorableWhitespace ( ) const
virtual

Get the 'include ignorable whitespace' flag.

This method returns the state of the parser's include ignorable whitespace flag.

Returns
'true' if the include ignorable whitespace flag is set on the parser, 'false' otherwise.
See Also
setIncludeIgnorableWhitespace
virtual int XalanSourceTreeParserLiaison::getIndent ( ) const
virtual

Get the amount to indent when indent-result="yes".

Deprecated:
Returns
number of characters to indent

Implements XMLParserLiaison.

MemoryManagerType& XalanSourceTreeParserLiaison::getMemoryManager ( )
virtual

Implements XMLParserLiaison.

virtual const XalanDOMString& XalanSourceTreeParserLiaison::getParserDescription ( XalanDOMString theResult) const
virtual

Return a string suitable for telling the user what parser is being used.

Returns
string describing parser

Implements XMLParserLiaison.

bool XalanSourceTreeParserLiaison::getPoolAllText ( ) const

Get the value of the flag which determines if the data of all text nodes are pooled, or just whitespace text nodes.

Returns
true if the data of all text nodes are pooled, false otherwise.
virtual bool XalanSourceTreeParserLiaison::getUseValidation ( ) const
virtual

Get whether or not validation will be performed.

Validation is off by default.

Returns
true to perform validation

Implements XMLParserLiaison.

XalanSourceTreeDocument* XalanSourceTreeParserLiaison::mapDocument ( const XalanDocument theDocument) const

Map a pointer to a XalanDocument instance to its implementation class pointer.

Normally, you should have no reason for doing this. The liaison will return a null pointer if it did not create the instance passed.

Parameters
theDocumentA pointer to a XalanDocument instance.
Returns
A pointer to the XalanSourceTreeDocument instance.
virtual XalanDocument* XalanSourceTreeParserLiaison::parseXMLStream ( const InputSourceType inputSource,
const XalanDOMString identifier = XalanDOMString(XalanMemMgrs::getDummyMemMgr()) 
)
virtual

Parse the text pointed at by the reader as XML, and return a DOM Document interface.

It is recommended that you pass in some sort of recognizable name, such as the filename or URI, with which the reader can be recognized if the parse fails.

The liaison owns the XalanDocument instance, and will delete it when when asked (see DestroyDocument()), or when the liaison is reset, or goes out of scope.

Parameters
readerstream that should hold valid XML
identifierused for diagnostic purposes only, some sort of identification for error reporting, default an empty string
Returns
DOM document created

Implements XMLParserLiaison.

virtual void XalanSourceTreeParserLiaison::parseXMLStream ( const InputSourceType inputSource,
DocumentHandlerType handler,
const XalanDOMString identifier = XalanDOMString(XalanMemMgrs::getDummyMemMgr()) 
)
virtual

Parse the text pointed at by the reader as XML.

It is recommended that you pass in some sort of recognizable name, such as the filename or URI, with which the reader can be recognized if the parse fails.

Parameters
inputSourceinput source that should hold valid XML
handlerinstance of a DocumentHandler
identifierused for diagnostic purposes only, some sort of identification for error reporting, default an empty string

Implements XMLParserLiaison.

virtual void XalanSourceTreeParserLiaison::parseXMLStream ( const InputSourceType theInputSource,
ContentHandlerType theContentHandler,
const XalanDOMString theIdentifier,
DTDHandlerType theDTDHandler = 0,
LexicalHandlerType theLexicalHandler = 0 
)
virtual

Parse using a SAX2 ContentHandler, DTDHandler, and LexicalHandler.

Parameters
theInputSourceThe input source for the parser
theContentHandlerThe ContentHandler to use
theDTDHandlerThe DTDHandler to use. May be null.
theLexicalHandlerThe LexicalHandler to use. May be null.
identifierUsed for error reporting only.
virtual void XalanSourceTreeParserLiaison::reset ( )
virtual

Implements XMLParserLiaison.

virtual void XalanSourceTreeParserLiaison::setDoNamespaces ( bool  newState)
virtual

This method allows users to enable or disable the parser's namespace processing.

When set to true, parser starts enforcing all the constraints / rules specified by the NameSpace specification.

The parser's default state is: false.

This flag is ignored by the underlying scanner if the installed validator indicates that namespace constraints should be enforced.

Parameters
newStateThe value specifying whether NameSpace rules should be enforced or not.
See Also
getDoNamespaces
virtual void XalanSourceTreeParserLiaison::setEntityResolver ( EntityResolverType resolver)
virtual

This method installs the user specified entity resolver on the parser.

It allows applications to trap and redirect calls to external entities.

Parameters
handlerA pointer to the entity resolver to be called when the parser comes across references to entities in the XML file.

Implements XMLParserLiaison.

virtual void XalanSourceTreeParserLiaison::setErrorHandler ( ErrorHandlerType handler)
virtual

This method installs the user specified error handler on the parser.

Parameters
handlerA pointer to the error handler to be called when the parser comes across 'error' events as per the SAX specification.
See Also
Parser::setErrorHandler

Implements XMLParserLiaison.

virtual void XalanSourceTreeParserLiaison::setExecutionContext ( ExecutionContext theContext)
virtual

Implements XMLParserLiaison.

virtual void XalanSourceTreeParserLiaison::setExitOnFirstFatalError ( bool  newState)
virtual

This method allows users to set the parser's behaviour when it encounters the first fatal error.

If set to true, the parser will exit at the first fatal error. If false, then it will report the error and continue processing.

The default value is 'true' and the parser exits on the first fatal error.

Parameters
newStateThe value specifying whether the parser should continue or exit when it encounters the first fatal error.
See Also
getExitOnFirstFatalError
virtual void XalanSourceTreeParserLiaison::setExternalNoNamespaceSchemaLocation ( const XalanDOMChar *  location)
virtual

This method sets the location for an external schema document for parsing.

Parameters
locationA string representing the location of the external schema document
virtual void XalanSourceTreeParserLiaison::setExternalSchemaLocation ( const XalanDOMChar *  location)
virtual

This method sets the location for an external schema document for parsing.

Parameters
locationA string representing the location of the external schema document
virtual void XalanSourceTreeParserLiaison::setIncludeIgnorableWhitespace ( bool  include)
virtual

Set the 'include ignorable whitespace' flag.

This method allows the user to specify whether a validating parser should include ignorable whitespaces as text nodes. It has no effect on non-validating parsers which always include non-markup text.

When set to true (also the default), ignorable whitespaces will be added to the DOM tree as text nodes. The method DOM_Text::isIgnorableWhitespace() will return true for those text nodes only.

When set to false, all ignorable whitespace will be discarded and no text node is added to the DOM tree. Note: applications intended to process the "xml:space" attribute should not set this flag to false.

Parameters
includeThe new state of the include ignorable whitespace flag.
See Also
getIncludeIgnorableWhitespace
virtual void XalanSourceTreeParserLiaison::setIndent ( int  i)
virtual

Set the amount to indent when indent-result="yes".

Deprecated:
Parameters
inumber of characters to indent

Implements XMLParserLiaison.

void XalanSourceTreeParserLiaison::setPoolAllText ( bool  fValue)

Set the value of the flag which determines if the data of all text nodes are pooled, or just whitespace text nodes.

Parameters
fValueThe new value for the flag.
virtual void XalanSourceTreeParserLiaison::setUseValidation ( bool  b)
virtual

If set to true, validation will be performed.

Validation is off by default.

Parameters
btrue to perform validation

Implements XMLParserLiaison.


The documentation for this class was generated from the following file:

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo