|
OpenTop 1.3 | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD |
#include "ot/sax/SAXFeatures.h"
Helper class containing convenient constant values for all the SAX features supported by the OpenTop XMLReader.
For convenience, use the constant data members from this class when setting features on an XMLReader. Here is an example of how the SAXFeatures static data members can be used in place of the long feature names:
// Create a XMLReader RefPtr<XMLReader> rpReader = XMLReaderFactory::CreateXMLReader(); // Switch on validation rpReader->setFeature(SAXFeatures::validation, true); // Switch off namespace support rpReader->setFeature(SAXFeatures::namespaces, false);
SAX defines standard feature URIs with the prefix http://xml.org/sax/features/ before an identifier such as validation.
The standard features supported by the OpenTop XMLReader are:-
Feature ID | Default | Description |
---|---|---|
external-general-entities | true | Reports whether this parser processes external general entities; always true if validating. |
external-parameter-entities | true | Reports whether this parser processes external parameter entities; always true if validating. |
is-standalone | none | May be examined only during a parse, after (but not during) the startDocument() callback has been made; read-only. The value is true if the document specified the "standalone" flag in its XML declaration, otherwise is false. |
lexical-handler/parameter-entities | false | true indicates that the LexicalHandler will report the beginning and end of parameter entities. |
namespaces | true | true indicates namespace URIs and unprefixed local names for element and attribute names will be available. |
namespace-prefixes | false | true indicates XML 1.0 names (with prefixes) and attributes (including xmlns* attributes) will be available. |
resolve-dtd-uris | true | A value of true indicates that system IDs in declarations will be absolutized (relative to their base URIs) before reporting. (That is the default behavior for all SAX2 XML parsers.) A value of false indicates those IDs will not be absolutized; parsers will provide the base URI from Locator::getSystemId(). This applies to system IDs passed in
|
validation | false | controls whether the parser is reporting all validity errors; if true, all external entities will be read. |
OpenTop provides some additions to the core SAX features. They are represented by absolute URIs starting with the prefix http://elcel.com/opentop/sax/features/. The extended features supported by the OpenTop XMLReader are:-
Feature ID | Default | Description |
---|---|---|
resolve-entity-uris | false | A value of true indicates that system IDs reported by Locator::getSystemId() and EntityResolver::resolveEntity() will be absolutized (relative to their base URIs) before reporting. (That is the default behavior for all SAX2 XML parsers.) A value of false indicates those IDs will not be absolutized. |
interoperability | false | A value of true indicates that additional checks will be enabled which test the XML input stream for interoperability with SGML-based systems. |
warnings | false | A value of true indicates that additional checks will be enabled which perform tests that are deemed to be of low importance and result in ErrorHandler::warning() events when triggered. |
validate-namespace-declarations | true | A value of true indicates that namespace declaration attributes (those beginning with xmlns) will be subject to DTD validation just like any other attributes. A value of false makes the parser treat all namespace declarations as if they have been implicitly defined in the DTD. |
Public Static Data Members |
const String enable_relative_namespace_uri_test
const String external_general_entities
const String external_parameter_entities
const String interoperability
const String is_standalone
const String lexical_handler_parameter_entities
const String namespace_prefixes
const String namespaces
const String resolve_dtd_uris
const String resolve_entity_uris
const String validate_namespace_declarations
const String validation
const String warnings
|
OpenTop 1.3 | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD |