]> source.dussan.org Git - poi.git/commitdiff
Provide XAdES schemas locally, because of connection timeouts
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 9 Dec 2019 22:53:14 +0000 (22:53 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 9 Dec 2019 22:53:14 +0000 (22:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1871110 13f79535-47bb-0310-9956-ffa450edef68

build.xml
src/ooxml/resources/org/apache/poi/schemas/XAdES.xsd [new file with mode: 0644]
src/ooxml/resources/org/apache/poi/schemas/XAdESv141.xsd [new file with mode: 0644]

index 12b4bedcf37afee5e2c1637d4773a7dc00d703d3..06bcc058b5efd4c2238c8cbd18dfcbbf3082d726 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -290,8 +290,8 @@ under the License.
     <!-- additional schemas are packed into the poi schemas jar, -->
     <!-- so we don't have to care about a seperate versioning of the original ooxml schemas -->
     <property name="ooxml.xsds.dsig.1" value="https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
-    <property name="ooxml.xsds.dsig.2" value="https://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>
-    <property name="ooxml.xsds.dsig.3" value="https://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd"/>
+    <!-- property name="ooxml.xsds.dsig.2" value="https://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/ -->
+    <!-- property name="ooxml.xsds.dsig.3" value="https://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd"/ -->
     <property name="ooxml.xsds.ozip.2" value="OfficeOpenXML-Part2.zip"/>
     <property name="ooxml.xsds.izip.2" value="OpenPackagingConventions-XMLSchema.zip"/>
     <property name="ooxml.xsds.url.2"
@@ -307,7 +307,7 @@ under the License.
     <property name="coverage.dir" value="build/coverage"/>
     <!-- Exclude some uninteresting classes from coverage-instrumentation as we do not want to measure coverage in those packages anyway -->
     <property name="coverage.excludes" value="org.openxmlformats.*:com.*:org.junit.*:junit.*:org.etsi.*:org.w3.*:org.slf4j.*:org.hamcrest.*:org.bouncycastle.*:org.apache.xmlbeans.*:org.apache.tools.*:org.apache.commons.*:org.apache.jcp.*:sun.*:schemaorg_apache_xmlbeans.*"/>
-    
+
     <property name="file.leak.detector" value="-Dthis.is.a.dummy=true"/>
 
     <!-- Apache RAT license check properties -->
@@ -536,7 +536,7 @@ under the License.
         <path refid="scratchpad.classpath"/>
         <path refid="ooxml.classpath"/>
         <path refid="ooxml.xmlsec.classpath"/>
-        <path refid="test.ooxml.reflections.classpath"/> 
+        <path refid="test.ooxml.reflections.classpath"/>
         <path refid="excelant.classpath"/>
         <path refid="examples.classpath"/>
         <pathelement location="${examples.output.dir}"/>
@@ -878,8 +878,8 @@ under the License.
             <url url="${ooxml.xsds.url.1}"/>
             <url url="${ooxml.xsds.url.2}"/>
             <url url="${ooxml.xsds.dsig.1}"/>
-            <url url="${ooxml.xsds.dsig.2}"/>
-            <url url="${ooxml.xsds.dsig.3}"/>
+            <!--url url="${ooxml.xsds.dsig.2}"/ -->
+            <!--url url="${ooxml.xsds.dsig.3}"/ -->
             <chainedmapper>
                 <flattenmapper/>
                 <firstmatchmapper>
@@ -1030,15 +1030,16 @@ under the License.
             <xsds>
                 <zipfileset src="${ooxml.lib}/${ooxml.xsds.izip.1}"/>
                 <fileset dir="${ooxml.visio.xsd.dir}"/>
-                <fileset dir="${ooxml.schema.xsdconfig.dir}"/>
+                <fileset dir="${ooxml.schema.xsdconfig.dir}" excludes="XAdES*.xsd"/>
             </xsds>
         </compile-ooxml-xmlbean>
         <!-- Now do the same for the security schemas -->
         <compile-ooxml-xmlbean classes-jar="${ooxml.security.jar}" sources-jar="${ooxml.security.src.jar}">
             <xsds>
                 <zipfileset src="${ooxml.lib}/${ooxml.xsds.izip.2}" includes="opc-digSig.xsd,opc-relationships.xsd"/>
-                <fileset dir="${ooxml.lib}" includes="xmldsig*.xsd,XAdES*.xsd"/>
+                <fileset dir="${ooxml.lib}" includes="xmldsig*.xsd"/>
                 <fileset dir="${ooxml.security.xsd.dir}"/>
+                <fileset dir="${ooxml.schema.xsdconfig.dir}" includes="XAdES*.xsd,*.xsdconfig"/>
             </xsds>
         </compile-ooxml-xmlbean>
     </target>
@@ -1265,7 +1266,7 @@ under the License.
         <delete dir="${ooxml.reports.test}"/>
         <delete dir="${ooxml.output.test.dir}"/>
         <mkdir dir="${ooxml.reports.test}"/>
-        <mkdir dir="${ooxml.output.test.dir}"/> 
+        <mkdir dir="${ooxml.output.test.dir}"/>
         <!-- compile the sources -->
         <javac target="${jdk.version.class}"
                source="${jdk.version.source}"
@@ -1745,7 +1746,7 @@ under the License.
     </target>
 
     <target name="docs" depends="init, -check-forrest-installed, -check-docs, javadocs, -forrest-docs"
-            unless="main.docs.notRequired" 
+            unless="main.docs.notRequired"
             description="Builds the POI website" />
 
     <target name="site" depends="-forrest-docs"/>
@@ -1786,7 +1787,7 @@ under the License.
             <packageset dir="${ooxml.src}" defaultexcludes="yes">
                 <include name="org/apache/poi/**"/>
             </packageset>
-            
+
             <arg value="--add-modules=java.xml.bind" if:true="${addOpens10}"/>
 
             <doctitle><![CDATA[<h1>POI API Documentation</h1>]]></doctitle>
@@ -2184,6 +2185,7 @@ under the License.
                 <exclude name="resources/main/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml" />
                 <exclude name="resources/ooxml/org/apache/poi/xssf/usermodel/presetTableStyles.xml" />
                 <exclude name="ooxml/resources/org/apache/poi/xdgf/visio.xsd" />
+                <exclude name="ooxml/resources/org/apache/poi/schemas/XAdES*.xsd" />
                 <exclude name="**/*.iml" />
                 <exclude name="documentation/resources/images/pb-poi.cdr"/>
                 <exclude name="scratchpad/models/poi-hdf.zargo"/>
@@ -2849,7 +2851,7 @@ under the License.
     </target>
 
     <target name="test-env" description="tests if ant is available on the jenkins slave">
-      <echo>Using Ant: ${ant.version} from ${ant.home}</echo>    
+      <echo>Using Ant: ${ant.version} from ${ant.home}</echo>
     </target>
 
        <target name="replaceVersion" description="Apply the version from build.xml in all other places">
diff --git a/src/ooxml/resources/org/apache/poi/schemas/XAdES.xsd b/src/ooxml/resources/org/apache/poi/schemas/XAdES.xsd
new file mode 100644 (file)
index 0000000..4b74692
--- /dev/null
@@ -0,0 +1,466 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">\r
+       <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>\r
+       <!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType, \r
+EncapsulatedPKIDataType and containers for time-stamp tokens -->\r
+       <!-- Start AnyType -->\r
+       <xsd:element name="Any" type="AnyType"/>\r
+       <xsd:complexType name="AnyType" mixed="true">\r
+               <xsd:sequence minOccurs="0" maxOccurs="unbounded">\r
+                       <xsd:any namespace="##any" processContents="lax"/>\r
+               </xsd:sequence>\r
+               <xsd:anyAttribute namespace="##any"/>\r
+       </xsd:complexType>\r
+       <!-- End AnyType -->\r
+       <!-- Start ObjectIdentifierType-->\r
+       <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>\r
+       <xsd:complexType name="ObjectIdentifierType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="Identifier" type="IdentifierType"/>\r
+                       <xsd:element name="Description" type="xsd:string" minOccurs="0"/>\r
+                       <xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="IdentifierType">\r
+               <xsd:simpleContent>\r
+                       <xsd:extension base="xsd:anyURI">\r
+                               <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>\r
+                       </xsd:extension>\r
+               </xsd:simpleContent>\r
+       </xsd:complexType>\r
+       <xsd:simpleType name="QualifierType">\r
+               <xsd:restriction base="xsd:string">\r
+                       <xsd:enumeration value="OIDAsURI"/>\r
+                       <xsd:enumeration value="OIDAsURN"/>\r
+               </xsd:restriction>\r
+       </xsd:simpleType>\r
+       <xsd:complexType name="DocumentationReferencesType">\r
+               <xsd:sequence maxOccurs="unbounded">\r
+                       <xsd:element name="DocumentationReference" type="xsd:anyURI"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End ObjectIdentifierType-->\r
+       <!-- Start EncapsulatedPKIDataType-->\r
+       <xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>\r
+       <xsd:complexType name="EncapsulatedPKIDataType">\r
+               <xsd:simpleContent>\r
+                       <xsd:extension base="xsd:base64Binary">\r
+                               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+                               <xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>\r
+                       </xsd:extension>\r
+               </xsd:simpleContent>\r
+       </xsd:complexType>\r
+       <!-- End EncapsulatedPKIDataType -->\r
+       <!-- Start time-stamp containers types -->\r
+       <!-- Start GenericTimeStampType -->\r
+       <xsd:element name="Include" type="IncludeType"/>\r
+       <xsd:complexType name="IncludeType">\r
+               <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>\r
+               <xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>\r
+       <xsd:complexType name="ReferenceInfoType">\r
+               <xsd:sequence>\r
+                       <xsd:element ref="ds:DigestMethod"/>\r
+                       <xsd:element ref="ds:DigestValue"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+               <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="GenericTimeStampType" abstract="true">\r
+               <xsd:sequence>\r
+                       <xsd:choice minOccurs="0">\r
+                               <xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>\r
+                               <xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>\r
+                       </xsd:choice>\r
+                       <xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>\r
+                       <xsd:choice maxOccurs="unbounded">\r
+                               <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>\r
+                               <xsd:element name="XMLTimeStamp" type="AnyType"/>\r
+                       </xsd:choice>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End GenericTimeStampType -->\r
+       <!-- Start XAdESTimeStampType -->\r
+       <xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>\r
+       <xsd:complexType name="XAdESTimeStampType">\r
+               <xsd:complexContent>\r
+                       <xsd:restriction base="GenericTimeStampType">\r
+                               <xsd:sequence>\r
+                                       <xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>\r
+                                       <xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>\r
+                                       <xsd:choice maxOccurs="unbounded">\r
+                                               <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>\r
+                                               <xsd:element name="XMLTimeStamp" type="AnyType"/>\r
+                                       </xsd:choice>\r
+                               </xsd:sequence>\r
+                               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+                       </xsd:restriction>\r
+               </xsd:complexContent>\r
+       </xsd:complexType>\r
+       <!-- End XAdESTimeStampType -->\r
+       <!-- Start OtherTimeStampType -->\r
+       <xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>\r
+       <xsd:complexType name="OtherTimeStampType">\r
+               <xsd:complexContent>\r
+                       <xsd:restriction base="GenericTimeStampType">\r
+                               <xsd:sequence>\r
+                                       <xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>\r
+                                       <xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>\r
+                                       <xsd:choice>\r
+                                               <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>\r
+                                               <xsd:element name="XMLTimeStamp" type="AnyType"/>\r
+                                       </xsd:choice>\r
+                               </xsd:sequence>\r
+                               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+                       </xsd:restriction>\r
+               </xsd:complexContent>\r
+       </xsd:complexType>\r
+       <!-- End OtherTimeStampType -->\r
+       <!-- End time-stamp containers types -->\r
+       <!-- End auxiliary types definitions-->\r
+       <!-- Start container types -->\r
+       <!-- Start QualifyingProperties -->\r
+       <xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>\r
+       <xsd:complexType name="QualifyingPropertiesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>\r
+                       <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Target" type="xsd:anyURI" use="required"/>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End QualifyingProperties -->\r
+       <!-- Start SignedProperties-->\r
+       <xsd:element name="SignedProperties" type="SignedPropertiesType"/>\r
+       <xsd:complexType name="SignedPropertiesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>\r
+                       <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End SignedProperties-->\r
+       <!-- Start UnsignedProperties-->\r
+       <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>\r
+       <xsd:complexType name="UnsignedPropertiesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>\r
+                       <xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End UnsignedProperties-->\r
+       <!-- Start SignedSignatureProperties-->\r
+       <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>\r
+       <xsd:complexType name="SignedSignaturePropertiesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>\r
+                       <xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>\r
+                       <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>\r
+                       <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>\r
+                       <xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End SignedSignatureProperties-->\r
+       <!-- Start SignedDataObjectProperties-->\r
+       <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>\r
+       <xsd:complexType name="SignedDataObjectPropertiesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>\r
+                       <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>\r
+                       <xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>\r
+                       <xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End SignedDataObjectProperties-->\r
+       <!-- Start UnsignedSignatureProperties-->\r
+       <xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>\r
+       <xsd:complexType name="UnsignedSignaturePropertiesType">\r
+               <xsd:choice maxOccurs="unbounded">\r
+                       <xsd:element name="CounterSignature" type="CounterSignatureType"/>\r
+                       <xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>\r
+                       <xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>\r
+                       <xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>\r
+                       <xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>\r
+                       <xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>\r
+                       <xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>\r
+                       <xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>\r
+                       <xsd:element name="CertificateValues" type="CertificateValuesType"/>\r
+                       <xsd:element name="RevocationValues" type="RevocationValuesType"/>\r
+                       <xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>\r
+                       <xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>\r
+                       <xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>\r
+                       <xsd:any namespace="##other"/>\r
+               </xsd:choice>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End UnsignedSignatureProperties-->\r
+       <!-- Start UnsignedDataObjectProperties-->\r
+       <xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>\r
+       <xsd:complexType name="UnsignedDataObjectPropertiesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End UnsignedDataObjectProperties-->\r
+       <!-- Start QualifyingPropertiesReference-->\r
+       <xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>\r
+       <xsd:complexType name="QualifyingPropertiesReferenceType">\r
+               <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End QualifyingPropertiesReference-->\r
+       <!-- End container types -->\r
+       <!-- Start SigningTime element -->\r
+       <xsd:element name="SigningTime" type="xsd:dateTime"/>\r
+       <!-- End SigningTime element -->\r
+       <!-- Start SigningCertificate -->\r
+       <xsd:element name="SigningCertificate" type="CertIDListType"/>\r
+       <xsd:complexType name="CertIDListType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="CertIDType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CertDigest" type="DigestAlgAndValueType"/>\r
+                       <xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="DigestAlgAndValueType">\r
+               <xsd:sequence>\r
+                       <xsd:element ref="ds:DigestMethod"/>\r
+                       <xsd:element ref="ds:DigestValue"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End SigningCertificate -->\r
+       <!-- Start SignaturePolicyIdentifier -->\r
+       <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>\r
+       <xsd:complexType name="SignaturePolicyIdentifierType">\r
+               <xsd:choice>\r
+                       <xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>\r
+                       <xsd:element name="SignaturePolicyImplied"/>\r
+               </xsd:choice>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="SignaturePolicyIdType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>\r
+                       <xsd:element ref="ds:Transforms" minOccurs="0"/>\r
+                       <xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>\r
+                       <xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="SigPolicyQualifiersListType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:element name="SPURI" type="xsd:anyURI"/>\r
+       <xsd:element name="SPUserNotice" type="SPUserNoticeType"/>\r
+       <xsd:complexType name="SPUserNoticeType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>\r
+                       <xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="NoticeReferenceType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="Organization" type="xsd:string"/>\r
+                       <xsd:element name="NoticeNumbers" type="IntegerListType"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="IntegerListType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End SignaturePolicyIdentifier -->\r
+       <!-- Start CounterSignature -->\r
+       <xsd:element name="CounterSignature" type="CounterSignatureType"/>\r
+       <xsd:complexType name="CounterSignatureType">\r
+               <xsd:sequence>\r
+                       <xsd:element ref="ds:Signature"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End CounterSignature -->\r
+       <!-- Start DataObjectFormat -->\r
+       <xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>\r
+       <xsd:complexType name="DataObjectFormatType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="Description" type="xsd:string" minOccurs="0"/>\r
+                       <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>\r
+                       <xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>\r
+                       <xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>\r
+       </xsd:complexType>\r
+       <!-- End DataObjectFormat -->\r
+       <!-- Start CommitmentTypeIndication -->\r
+       <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>\r
+       <xsd:complexType name="CommitmentTypeIndicationType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>\r
+                       <xsd:choice>\r
+                               <xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>\r
+                               <xsd:element name="AllSignedDataObjects"/>\r
+                       </xsd:choice>\r
+                       <xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="CommitmentTypeQualifiersListType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End CommitmentTypeIndication -->\r
+       <!-- Start SignatureProductionPlace -->\r
+       <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>\r
+       <xsd:complexType name="SignatureProductionPlaceType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="City" type="xsd:string" minOccurs="0"/>\r
+                       <xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>\r
+                       <xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>\r
+                       <xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End SignatureProductionPlace -->\r
+       <!-- Start SignerRole -->\r
+       <xsd:element name="SignerRole" type="SignerRoleType"/>\r
+       <xsd:complexType name="SignerRoleType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>\r
+                       <xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="ClaimedRolesListType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="CertifiedRolesListType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End SignerRole -->\r
+       <xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>\r
+       <xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>\r
+       <xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>\r
+       <!-- Start CompleteCertificateRefs -->\r
+       <xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>\r
+       <xsd:complexType name="CompleteCertificateRefsType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CertRefs" type="CertIDListType"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End CompleteCertificateRefs -->\r
+       <!-- Start CompleteRevocationRefs-->\r
+       <xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>\r
+       <xsd:complexType name="CompleteRevocationRefsType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>\r
+                       <xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>\r
+                       <xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="CRLRefsType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="CRLRefType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>\r
+                       <xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="CRLIdentifierType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="Issuer" type="xsd:string"/>\r
+                       <xsd:element name="IssueTime" type="xsd:dateTime"/>\r
+                       <xsd:element name="Number" type="xsd:integer" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="OCSPRefsType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="OCSPRefType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>\r
+                       <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="ResponderIDType">\r
+               <xsd:choice>\r
+                       <xsd:element name="ByName" type="xsd:string"/>\r
+                       <xsd:element name="ByKey" type="xsd:base64Binary"/>\r
+               </xsd:choice>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="OCSPIdentifierType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="ResponderID" type="ResponderIDType"/>\r
+                       <xsd:element name="ProducedAt" type="xsd:dateTime"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="OtherCertStatusRefsType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End CompleteRevocationRefs-->\r
+       <xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>\r
+       <xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>\r
+       <xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>\r
+       <xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>\r
+       <!-- Start CertificateValues -->\r
+       <xsd:element name="CertificateValues" type="CertificateValuesType"/>\r
+       <xsd:complexType name="CertificateValuesType">\r
+               <xsd:choice minOccurs="0" maxOccurs="unbounded">\r
+                       <xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>\r
+                       <xsd:element name="OtherCertificate" type="AnyType"/>\r
+               </xsd:choice>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <!-- End CertificateValues -->\r
+       <!-- Start RevocationValues-->\r
+       <xsd:element name="RevocationValues" type="RevocationValuesType"/>\r
+       <xsd:complexType name="RevocationValuesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>\r
+                       <xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>\r
+                       <xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="CRLValuesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="OCSPValuesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <xsd:complexType name="OtherCertStatusValuesType">\r
+               <xsd:sequence>\r
+                       <xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>\r
+               </xsd:sequence>\r
+       </xsd:complexType>\r
+       <!-- End RevocationValues-->\r
+       <xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>\r
+       <xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>\r
+       <xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>\r
+</xsd:schema>\r
diff --git a/src/ooxml/resources/org/apache/poi/schemas/XAdESv141.xsd b/src/ooxml/resources/org/apache/poi/schemas/XAdESv141.xsd
new file mode 100644 (file)
index 0000000..8cb5279
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">\r
+       <xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>\r
+       <!-- Start CertificateValues -->\r
+       <xsd:element name="TimeStampValidationData" type="ValidationDataType"/>\r
+       <xsd:complexType name="ValidationDataType">\r
+               <xsd:sequence>\r
+                       <xsd:element ref="xades:CertificateValues" minOccurs="0"/>\r
+                       <xsd:element ref="xades:RevocationValues" minOccurs="0"/>\r
+               </xsd:sequence>\r
+               <xsd:attribute name="Id" type="xsd:ID" use="optional"/>\r
+               <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>\r
+       </xsd:complexType>\r
+       <xsd:element name="ArchiveTimeStamp" type="xades:XAdESTimeStampType"/>\r
+</xsd:schema>\r