Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsISAXXMLFilter Interface Reference

Interface for an XML filter. More...

import "nsISAXXMLFilter.idl";

Inheritance diagram for nsISAXXMLFilter:
Inheritance graph
[legend]
Collaboration diagram for nsISAXXMLFilter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setFeature (in AString name, in boolean value)
 Set the value of a feature flag.
boolean getFeature (in AString name)
 Look up the value of a feature flag.
void setProperty (in AString name, in nsISupports value)
 Set the value of a property.
boolean getProperty (in AString name)
 Look up the value of a property.
void parseFromString (in AString str, in string contentType)
void parseFromStream (in nsIInputStream stream, in string charset, in string contentType)
void parseAsync (in nsIRequestObserver observer)
 Begin an asynchronous parse.
void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long aOffset, in unsigned long aCount)
 Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread.
void onStartRequest (in nsIRequest aRequest, in nsISupports aContext)
 Called to signify the beginning of an asynchronous request.
void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode)
 Called to signify the end of an asynchronous request.

Public Attributes

attribute nsISAXXMLReader parent
 The parent reader.
attribute nsIURI baseURI
 The base URI.
attribute nsISAXContentHandler contentHandler
 If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.
attribute nsISAXDTDHandler dtdHandler
 If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.
attribute nsISAXErrorHandler errorHandler
 If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue.
attribute nsISAXLexicalHandler lexicalHandler
 If the application does not register a lexical handler, all lexical events (e.g.

Detailed Description

Interface for an XML filter.

An XML filter is like an XML reader, except that it obtains its events from another XML reader rather than a primary source like an XML document or database. Filters can modify a stream of events as they pass on to the final application.

Definition at line 50 of file nsISAXXMLFilter.idl.


Member Function Documentation

boolean nsISAXXMLReader::getFeature ( in AString  name) [inherited]

Look up the value of a feature flag.

NOT CURRENTLY IMPLEMENTED.

The feature name is any fully-qualified URI. It is possible for an XMLReader to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a parse.

All XMLReaders are required to recognize the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes feature names.

Parameters:
nameString flag for a parser feature.
boolean nsISAXXMLReader::getProperty ( in AString  name) [inherited]

Look up the value of a property.

NOT CURRENTLY IMPLEMENTED.

The property name is any fully-qualified URI. It is possible for an XMLReader to recognize a property name but temporarily be unable to return its value. Some property values may be available only in specific contexts, such as before, during, or after a parse.

XMLReaders are not required to recognize any specific property names, though an initial core set is documented for SAX2.

Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.

Parameters:
nameThe property name, which is a fully-qualified URI.
Returns:
The current value of the property.
void nsIStreamListener::onDataAvailable ( in nsIRequest  aRequest,
in nsISupports  aContext,
in nsIInputStream  aInputStream,
in unsigned long  aOffset,
in unsigned long  aCount 
) [inherited]

Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread.

The onDataAvailable impl must read exactly |aCount| bytes of data before returning.

Parameters:
aRequestrequest corresponding to the source of the data
aContextuser defined context
aInputStreaminput stream containing the data chunk
aOffsetNumber of bytes that were sent in previous onDataAvailable calls for this request. In other words, the sum of all previous count parameters. If that number is greater than or equal to 2^32, this parameter will be PR_UINT32_MAX (2^32 - 1).
aCountnumber of bytes available in the stream

NOTE: The aInputStream parameter must implement readSegments.

An exception thrown from onDataAvailable has the side-effect of causing the request to be canceled.

void nsIRequestObserver::onStartRequest ( in nsIRequest  aRequest,
in nsISupports  aContext 
) [inherited]

Called to signify the beginning of an asynchronous request.

Parameters:
aRequestrequest being observed
aContextuser defined context

An exception thrown from onStartRequest has the side-effect of causing the request to be canceled.

Here is the caller graph for this function:

void nsIRequestObserver::onStopRequest ( in nsIRequest  aRequest,
in nsISupports  aContext,
in nsresult  aStatusCode 
) [inherited]

Called to signify the end of an asynchronous request.

This call is always preceded by a call to onStartRequest.

Parameters:
aRequestrequest being observed
aContextuser defined context
aStatusCodereason for stopping (NS_OK if completed successfully)

An exception thrown from onStopRequest is generally ignored.

Here is the caller graph for this function:

Begin an asynchronous parse.

This method initializes the parser, and must be called before any nsIStreamListener methods. It is then the caller's duty to call nsIStreamListener methods to drive the parser. Once this method is called, the caller must not call one of the other parse methods.

Parameters:
observerThe nsIRequestObserver to notify upon start or stop. Can be NULL.
void nsISAXXMLReader::parseFromStream ( in nsIInputStream  stream,
in string  charset,
in string  contentType 
) [inherited]
Parameters:
streamThe byte stream whose contents are parsed
charsetThe character set that was used to encode the byte stream. NULL if not specified.
contentTypeThe content type of the string - either text/xml, application/xml, or application/xhtml+xml. Must not be NULL.
void nsISAXXMLReader::parseFromString ( in AString  str,
in string  contentType 
) [inherited]
Parameters:
strThe UTF16 string to be parsed
contentTypeThe content type of the string (see parseFromStream)
void nsISAXXMLReader::setFeature ( in AString  name,
in boolean  value 
) [inherited]

Set the value of a feature flag.

NOT CURRENTLY IMPLEMENTED.

The feature name is any fully-qualified URI. It is possible for an XMLReader to expose a feature value but to be unable to change the current value. Some feature values may be immutable or mutable only in specific contexts, such as before, during, or after a parse.

All XMLReaders are required to support setting http://xml.org/sax/features/namespaces to true and http://xml.org/sax/features/namespace-prefixes to false.

Parameters:
nameString flag for a parser feature.
valueTurn the feature on/off.
void nsISAXXMLReader::setProperty ( in AString  name,
in nsISupports  value 
) [inherited]

Set the value of a property.

NOT CURRENTLY IMPLEMENTED.

The property name is any fully-qualified URI. It is possible for an XMLReader to recognize a property name but to be unable to change the current value. Some property values may be immutable or mutable only in specific contexts, such as before, during, or after a parse.

XMLReaders are not required to recognize setting any specific property names, though a core set is defined by SAX2.

This method is also the standard mechanism for setting extended handlers.

Parameters:
nameString flag for a parser feature
valueTurn the feature on/off.

Member Data Documentation

The base URI.

Definition at line 65 of file nsISAXXMLReader.idl.

If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Definition at line 76 of file nsISAXXMLReader.idl.

If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Definition at line 86 of file nsISAXXMLReader.idl.

If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue.

It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Definition at line 100 of file nsISAXXMLReader.idl.

If the application does not register a lexical handler, all lexical events (e.g.

startDTD) reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Definition at line 111 of file nsISAXXMLReader.idl.

The parent reader.

Allows the application to query the parent reader (which may be another filter). It is generally a bad idea to perform any operations on the parent reader directly: they should all pass through this filter.

Definition at line 60 of file nsISAXXMLFilter.idl.


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