2003-09-11 12:26:53 +02:00
|
|
|
#ifndef ARABICA_FEATURE_NAMES_H
|
|
|
|
#define ARABICA_FEATURE_NAMES_H
|
2002-06-21 13:16:28 +02:00
|
|
|
/*
|
|
|
|
* $Id$
|
|
|
|
*/
|
|
|
|
|
2007-09-05 00:55:47 +02:00
|
|
|
#include <SAX/ArabicaConfig.hpp>
|
2007-09-10 19:52:04 +02:00
|
|
|
#include <Arabica/StringAdaptor.hpp>
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2007-09-05 11:49:18 +02:00
|
|
|
namespace Arabica
|
|
|
|
{
|
2002-06-21 13:16:28 +02:00
|
|
|
namespace SAX
|
|
|
|
{
|
|
|
|
|
2007-09-06 00:08:51 +02:00
|
|
|
template<class string_type, class string_adaptor = Arabica::default_string_adaptor<string_type> >
|
2002-06-21 13:16:28 +02:00
|
|
|
struct FeatureNames
|
|
|
|
{
|
2002-10-08 04:48:22 +02:00
|
|
|
/** Reports whether this parser processes external general entities; always
|
|
|
|
* true if validating. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type external_general;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** Reports whether this parser processes external parameter entities; always
|
|
|
|
* true if validating. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type external_parameter;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** May be examined only during a parse, after the startDocument() callback has
|
|
|
|
* been completed; read-only. The value is true if the document specified the
|
|
|
|
* "standalone" flag in its XML declaration, and otherwise is false. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type is_standalone;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** True indicates that the LexicalHandler will report the beginning and end
|
|
|
|
* of parameter entities. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type lexical_parameter;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** True indicates namespace URIs and unprefixed local names for element and
|
|
|
|
* attribute names will be available.*/
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type namespaces;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** True indicates XML 1.0 names (with prefixes) and attributes (including
|
|
|
|
* xmlns* attributes) will be available. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type namespace_prefixes;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** 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
|
|
|
|
*
|
|
|
|
* - DTDHandler.notationDecl(),
|
|
|
|
* - DTDHandler.unparsedEntityDecl(), and
|
|
|
|
* - DeclHandler.externalEntityDecl().
|
|
|
|
*
|
|
|
|
*It does not apply to EntityResolver.resolveEntity(), which is not used to
|
|
|
|
report declarations, or to LexicalHandler.startDTD(), which already provides
|
|
|
|
the non-absolutized URI. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type resolve_dtd_uris;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** Returns true if the Attributes objects passed by this parser in
|
|
|
|
* ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2
|
|
|
|
* interface. That interface exposes additional DTD-related information, such
|
|
|
|
* as whether the attribute was specified in the source text rather than
|
|
|
|
* defaulted. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type use_attributes2;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** Returns true if the Locator objects passed by this parser in
|
|
|
|
* ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2
|
|
|
|
* interface. That interface exposes additional entity information, such as
|
|
|
|
* the character encoding and XML version used. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type use_locator2;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** Controls whether the parser is reporting all validity errors; if true,
|
|
|
|
* all external entities will be read. */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type validation;
|
2002-10-08 04:48:22 +02:00
|
|
|
/** Controls whether, when the namespace-prefixes feature is set, the parser
|
|
|
|
* treats namespace declaration attributes as being in the
|
|
|
|
* http://www.w3.org/2000/xmlns/ namespace. By default, SAX2 conforms to the
|
|
|
|
* original "Namespaces in XML" Recommendation, which explicitly states that
|
|
|
|
* such attributes are not in any namespace. Setting this optional flag to
|
|
|
|
* true makes the SAX2 events conform to a later backwards-incompatible
|
|
|
|
* revision of that recommendation, placing those attributes in a namespace.
|
|
|
|
* */
|
2007-09-06 00:08:51 +02:00
|
|
|
const string_type xmlns_uris;
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
FeatureNames() :
|
2007-09-06 00:08:51 +02:00
|
|
|
external_general(string_adaptor::construct_from_utf8("http://xml.org/sax/features/external-general-entities")),
|
|
|
|
external_parameter(string_adaptor::construct_from_utf8("http://xml.org/sax/features/external-parameter-entities")),
|
|
|
|
is_standalone(string_adaptor::construct_from_utf8("http://xml.org/sax/features/is-standalone")),
|
|
|
|
lexical_parameter(string_adaptor::construct_from_utf8("http://xml.org/sax/features/lexical-handler/parameter-entities")),
|
|
|
|
namespaces(string_adaptor::construct_from_utf8("http://xml.org/sax/features/namespaces")),
|
|
|
|
namespace_prefixes(string_adaptor::construct_from_utf8("http://xml.org/sax/features/namespace-prefixes")),
|
|
|
|
resolve_dtd_uris(string_adaptor::construct_from_utf8("http://xml.org/sax/features/resolve-dtd-uris")),
|
|
|
|
use_attributes2(string_adaptor::construct_from_utf8("http://xml.org/sax/features/use-attributes2")),
|
|
|
|
use_locator2(string_adaptor::construct_from_utf8("http://xml.org/sax/features/use-locator2")),
|
|
|
|
validation(string_adaptor::construct_from_utf8("http://xml.org/sax/features/validation")),
|
|
|
|
xmlns_uris(string_adaptor::construct_from_utf8("http://xml.org/sax/features/xmlns-uris"))
|
2002-06-21 13:16:28 +02:00
|
|
|
{
|
|
|
|
} // FeatureNames
|
|
|
|
}; // class FeatureNames
|
|
|
|
|
|
|
|
} // namespace SAX
|
2007-09-05 11:49:18 +02:00
|
|
|
} // namespace Arabica
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// end of file
|