Class XMLParserSettings
- java.lang.Object
-
- org.eclipse.rdf4j.rio.helpers.XMLParserSettings
-
public final class XMLParserSettings extends Object
ParserSettings for the XML parser features.Several of these settings can be overridden by means of a system property, but only if specified at JVM startup time.
- Author:
- Michael Grove, Peter Ansell
- See Also:
XMLConstants, Apache XML Project - Features
-
-
Field Summary
Fields Modifier and Type Field Description static RioSetting<XMLReader>CUSTOM_XML_READERParser setting to customise the XMLReader that is used by an XML based Rio parser.static BooleanRioSettingDISALLOW_DOCTYPE_DECLParser setting specifying whether DOCTYPE declaration should be disallowed.static BooleanRioSettingEXTERNAL_GENERAL_ENTITIESParser setting specifying whether external text entities should be included.static BooleanRioSettingEXTERNAL_PARAMETER_ENTITIESParser setting specifying whether external parameter entities should be included.static BooleanRioSettingFAIL_ON_DUPLICATE_RDF_IDParser setting to determine whether to throw an error for duplicate uses of rdf:ID in a single document.static BooleanRioSettingFAIL_ON_INVALID_NCNAMEParser setting to determine whether to ignore XML documents containing invalid NCNAMEs.static BooleanRioSettingFAIL_ON_INVALID_QNAMEParser setting to determine whether to ignore XML documents containing invalid QNAMEs.static BooleanRioSettingFAIL_ON_MISMATCHED_TAGSParser setting to determine whether to throw an error for XML documents containing mismatched tagsstatic BooleanRioSettingFAIL_ON_NON_STANDARD_ATTRIBUTESParser setting to determine whether to ignore non-standard attributes that are found in an XML document.static BooleanRioSettingFAIL_ON_SAX_NON_FATAL_ERRORSParser setting to determine whether to ignore non-fatal errors that come from SAX parsers.static BooleanRioSettingLOAD_EXTERNAL_DTDParser setting specifying whether external DTDs should be loaded.static BooleanRioSettingPARSE_STANDALONE_DOCUMENTSFlag indicating whether the parser parses stand-alone RDF documents.static BooleanRioSettingSECURE_PROCESSINGParser setting for the secure processing feature of XML parsers to avoid DOS attacks
-
-
-
Field Detail
-
SECURE_PROCESSING
public static final BooleanRioSetting SECURE_PROCESSING
Parser setting for the secure processing feature of XML parsers to avoid DOS attacksDefaults to true
Can be overridden by setting system property
http://javax.xml.XMLConstants/feature/secure-processing- See Also:
- XMLConstants.FEATURE_SECURE_PROCESSING
-
DISALLOW_DOCTYPE_DECL
public static final BooleanRioSetting DISALLOW_DOCTYPE_DECL
Parser setting specifying whether DOCTYPE declaration should be disallowed.Defaults to false. Can be overridden by setting system property
http://apache.org/xml/features/disallow-doctype-decl
-
LOAD_EXTERNAL_DTD
public static final BooleanRioSetting LOAD_EXTERNAL_DTD
Parser setting specifying whether external DTDs should be loaded.Defaults to false.
Can be overridden by setting system property
http://apache.org/xml/features/nonvalidating/load-external-dtd- See Also:
- Apache XML Project - Features
-
EXTERNAL_GENERAL_ENTITIES
public static final BooleanRioSetting EXTERNAL_GENERAL_ENTITIES
Parser setting specifying whether external text entities should be included.Defaults to false.
Can be overridden by setting system property
http://xml.org/sax/features/external-general-entities
-
EXTERNAL_PARAMETER_ENTITIES
public static final BooleanRioSetting EXTERNAL_PARAMETER_ENTITIES
Parser setting specifying whether external parameter entities should be included.Defaults to false.
Can be overridden by setting system property
http://xml.org/sax/features/external-parameter-entities
-
CUSTOM_XML_READER
public static final RioSetting<XMLReader> CUSTOM_XML_READER
Parser setting to customise the XMLReader that is used by an XML based Rio parser.IMPORTANT: The XMLReader must not be shared across different readers, so this setting must be reset for each parse operation.
Defaults to null, This settings is only useful if
RioConfig.isSet(RioSetting)returns true.
-
FAIL_ON_SAX_NON_FATAL_ERRORS
public static final BooleanRioSetting FAIL_ON_SAX_NON_FATAL_ERRORS
Parser setting to determine whether to ignore non-fatal errors that come from SAX parsers.Defaults to true
Can be overridden by setting system property
org.eclipse.rdf4j.rio.fail_on_sax_non_fatal_errors
-
FAIL_ON_NON_STANDARD_ATTRIBUTES
public static final BooleanRioSetting FAIL_ON_NON_STANDARD_ATTRIBUTES
Parser setting to determine whether to ignore non-standard attributes that are found in an XML document.Defaults to true
Can be overridden by setting system property
org.eclipse.rdf4j.rio.fail_on_non_standard_attributes
-
FAIL_ON_INVALID_NCNAME
public static final BooleanRioSetting FAIL_ON_INVALID_NCNAME
Parser setting to determine whether to ignore XML documents containing invalid NCNAMEs.Defaults to true
Can be overridden by setting system property
org.eclipse.rdf4j.rio.fail_on_invalid_ncname
-
FAIL_ON_DUPLICATE_RDF_ID
public static final BooleanRioSetting FAIL_ON_DUPLICATE_RDF_ID
Parser setting to determine whether to throw an error for duplicate uses of rdf:ID in a single document.Defaults to true
Can be overridden by setting system property
org.eclipse.rdf4j.rio.fail_on_duplicate_rdf_id
-
FAIL_ON_INVALID_QNAME
public static final BooleanRioSetting FAIL_ON_INVALID_QNAME
Parser setting to determine whether to ignore XML documents containing invalid QNAMEs.Defaults to true
Can be overridden by setting system property
org.eclipse.rdf4j.rio.fail_on_invalid_qname
-
FAIL_ON_MISMATCHED_TAGS
public static final BooleanRioSetting FAIL_ON_MISMATCHED_TAGS
Parser setting to determine whether to throw an error for XML documents containing mismatched tagsDefaults to true
Can be overridden by setting system property
org.eclipse.rdf4j.rio.fail_on_mismatched_tags
-
PARSE_STANDALONE_DOCUMENTS
public static final BooleanRioSetting PARSE_STANDALONE_DOCUMENTS
Flag indicating whether the parser parses stand-alone RDF documents. In stand-alone documents, the rdf:RDF element is optional if it contains just one element.Defaults to true
Can be overridden by setting system property
org.eclipse.rdf4j.rio.parse_standalone_documents
-
-