Package org.apache.poi.openxml4j.opc
Class OPCComplianceFlags
java.lang.Object
org.apache.poi.openxml4j.opc.OPCComplianceFlags
Allows disabling specific OPC compliance rules.
By default, rules M4.2, M4.3, M4.4, and M4.5 are all enforced which will prevent
non-compliant documents from being parsed.
Consumers may disable these compliance checks individually or as a whole at their
own discretion to allow certain non-compliant documents to be parsed.
- Since:
- 5.4.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanRule M4.3: Producers shall not create a document element that contains refinements to the Dublin Core elements, except for the two specified in the schema: <dcterms:created> and <dcterms:modified> Consumers shall consider a document element that violates this constraint to be an error.protected booleanRule M4.4: Producers shall not create a document element that contains the xml:lang attribute.protected boolean -
Method Summary
Modifier and TypeMethodDescriptionstatic OPCComplianceFlagsstatic OPCComplianceFlagsbooleanbooleanbooleanbooleansetForbidMarkupCompatibilityNamespace(boolean flag) setForbidRefiningDublinCoreElements(boolean flag) setForbidXmlLangAttribute(boolean flag) setRestrictXsiTypeAttribute(boolean flag)
-
Field Details
-
ENFORCE_M4_2_FORBID_MARKUP_COMPATIBILITY_NAMESPACE
protected boolean ENFORCE_M4_2_FORBID_MARKUP_COMPATIBILITY_NAMESPACE -
ENFORCE_M4_3_FORBID_REFINING_DUBLIN_CORE_ELEMENTS
protected boolean ENFORCE_M4_3_FORBID_REFINING_DUBLIN_CORE_ELEMENTSRule M4.3: Producers shall not create a document element that contains refinements to the Dublin Core elements, except for the two specified in the schema: <dcterms:created> and <dcterms:modified> Consumers shall consider a document element that violates this constraint to be an error. -
ENFORCE_M4_4_FORBID_XML_LANG_ATTRIBUTE
protected boolean ENFORCE_M4_4_FORBID_XML_LANG_ATTRIBUTERule M4.4: Producers shall not create a document element that contains the xml:lang attribute. Consumers shall consider a document element that violates this constraint to be an error. -
ENFORCE_M4_5_RESTRICT_XSI_TYPE_ATTRIBUTE
protected boolean ENFORCE_M4_5_RESTRICT_XSI_TYPE_ATTRIBUTE
-
-
Method Details
-
enforceAll
-
disableAll
-
setForbidMarkupCompatibilityNamespace
-
setForbidRefiningDublinCoreElements
-
setForbidXmlLangAttribute
-
setRestrictXsiTypeAttribute
-
getForbidMarkupCompatibilityNamespace
public boolean getForbidMarkupCompatibilityNamespace() -
getForbidRefiningDublinCoreElements
public boolean getForbidRefiningDublinCoreElements() -
getForbidXmlLangAttributes
public boolean getForbidXmlLangAttributes() -
getRestrictXsiTypeAttribute
public boolean getRestrictXsiTypeAttribute()
-