Class PackagePropertiesUnmarshaller

java.lang.Object
org.apache.poi.openxml4j.opc.internal.unmarshallers.PackagePropertiesUnmarshaller
All Implemented Interfaces:
PartUnmarshaller

public final class PackagePropertiesUnmarshaller extends Object implements PartUnmarshaller
Package properties unmarshaller.
Author:
Julien Chable
  • Field Details

  • Constructor Details

    • PackagePropertiesUnmarshaller

      public PackagePropertiesUnmarshaller()
  • Method Details

    • unmarshall

      Description copied from interface: PartUnmarshaller
      Save the content of the package in the stream
      Specified by:
      unmarshall in interface PartUnmarshaller
      in - The input stream from which the part will be unmarshall.
      Returns:
      The part freshly unmarshall from the input stream.
      Throws:
      InvalidFormatException
      IOException
    • checkElementForOPCCompliance

      public void checkElementForOPCCompliance(Element el) throws InvalidFormatException
      Check the element for the following OPC compliance rules:

      Rule M4.2: A format consumer shall consider the use of the Markup Compatibility namespace to be an error.

      Rule 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.

      Rule 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.

      Rule M4.5: Producers shall not create a document element that contains the xsi:type attribute, except for a <dcterms:created> or <dcterms:modified> element where the xsi:type attribute shall be present and shall hold the value dcterms:W3CDTF, where dcterms is the namespace prefix of the Dublin Core namespace. Consumers shall consider a document element that violates this constraint to be an error.

      Throws:
      InvalidFormatException