Browse Source

Update OpenDocument schema files to v1.2 OASIS standard

* etc/schema/od-schema-v1.2-os.rnc: OASIS standard
* etc/schema/od-manifest-schema-v1.2-os.rnc: OASIS standard
* etc/schema/schemas.xml: Fix uri to rnc files.
* lisp/org-odt.el (org-export-odt-schema-dir): Modified to
accommodate change in rnc file names.
* contrib/lisp/org-e-odt.el (org-e-odt-schema-dir): Modified
to accommodate change in rnc file names.
Jambunathan K 7 years ago
parent
commit
293a14d13f

+ 8 - 8
contrib/lisp/org-e-odt.el

@@ -381,11 +381,11 @@ visually."
 	     (lambda (schema-dir)
 	       (when schema-dir
 		 (message "Debug (org-e-odt): Trying %s..." schema-dir)
-		 (when (and (file-readable-p
-			     (expand-file-name "od-manifest-schema-v1.2-cs01.rnc"
+		 (when (and (file-expand-wildcards
+			     (expand-file-name "od-manifest-schema*.rnc"
 					       schema-dir))
-			    (file-readable-p
-			     (expand-file-name "od-schema-v1.2-cs01.rnc"
+			    (file-expand-wildcards
+			     (expand-file-name "od-schema*.rnc"
 					       schema-dir))
 			    (file-readable-p
 			     (expand-file-name "schemas.xml" schema-dir)))
@@ -425,10 +425,10 @@ Also add it to `rng-schema-locating-files'."
     (let ((schema-dir value))
       (set var
 	   (if (and
-		(file-readable-p
-		 (expand-file-name "od-manifest-schema-v1.2-cs01.rnc" schema-dir))
-		(file-readable-p
-		 (expand-file-name "od-schema-v1.2-cs01.rnc" schema-dir))
+		(file-expand-wildcards
+		 (expand-file-name "od-manifest-schema*.rnc" schema-dir))
+		(file-expand-wildcards
+		 (expand-file-name "od-schema*.rnc" schema-dir))
 		(file-readable-p
 		 (expand-file-name "schemas.xml" schema-dir)))
 	       schema-dir

+ 2 - 2
etc/schema/od-manifest-schema-v1.2-cs01.rnc

@@ -1,7 +1,7 @@
 # Open Document Format for Office Applications (OpenDocument) Version 1.2
-# Committee Specification (CS) 01, 17 March 2011
+# OASIS Standard, 29 September 2011
 # Manifest Relax-NG Schema
-# 
+# Source: http://docs.oasis-open.org/office/v1.2/os/
 # Copyright (c) OASIS Open 2002-2011. All Rights Reserved.
 # 
 # All capitalized terms in the following text have the meanings assigned to them

+ 2 - 2
etc/schema/od-schema-v1.2-cs01.rnc

@@ -1,7 +1,7 @@
 # Open Document Format for Office Applications (OpenDocument) Version 1.2
-# Committee Specification (CS) 01, 17 March 2011
+# OASIS Standard, 29 September 2011
 # Relax-NG Schema
-# 
+# Source: http://docs.oasis-open.org/office/v1.2/os/
 # Copyright (c) OASIS Open 2002-2011. All Rights Reserved.
 # 
 # All capitalized terms in the following text have the meanings assigned to them

+ 2 - 2
etc/schema/schemas.xml

@@ -2,6 +2,6 @@
 <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
   <documentElement prefix="office" typeId="OpenDocument"/>
   <documentElement prefix="manifest" localName="manifest" typeId="OpenDocument Manifest"/>
-  <typeId id="OpenDocument" uri="od-schema-v1.2-cs01.rnc"/>
-  <typeId id="OpenDocument Manifest" uri="od-manifest-schema-v1.2-cs01.rnc"/>
+  <typeId id="OpenDocument" uri="od-schema-v1.2-os.rnc"/>
+  <typeId id="OpenDocument Manifest" uri="od-manifest-schema-v1.2-os.rnc"/>
 </locatingRules>

+ 8 - 8
lisp/org-odt.el

@@ -115,11 +115,11 @@ and `org-odt-data-dir'.")
 	     (lambda (schema-dir)
 	       (when schema-dir
 		 (message "Debug (org-odt): Trying %s..." schema-dir)
-		 (when (and (file-readable-p
-			     (expand-file-name "od-manifest-schema-v1.2-cs01.rnc"
+		 (when (and (file-expand-wildcards
+			     (expand-file-name "od-manifest-schema*.rnc"
 					       schema-dir))
-			    (file-readable-p
-			     (expand-file-name "od-schema-v1.2-cs01.rnc"
+			    (file-expand-wildcards
+			     (expand-file-name "od-schema*.rnc"
 					       schema-dir))
 			    (file-readable-p
 			     (expand-file-name "schemas.xml" schema-dir)))
@@ -159,10 +159,10 @@ Also add it to `rng-schema-locating-files'."
     (let ((schema-dir value))
       (set var
 	   (if (and
-		(file-readable-p
-		 (expand-file-name "od-manifest-schema-v1.2-cs01.rnc" schema-dir))
-		(file-readable-p
-		 (expand-file-name "od-schema-v1.2-cs01.rnc" schema-dir))
+		(file-expand-wildcards
+		 (expand-file-name "od-manifest-schema*.rnc" schema-dir))
+		(file-expand-wildcards
+		 (expand-file-name "od-schema*.rnc" schema-dir))
 		(file-readable-p
 		 (expand-file-name "schemas.xml" schema-dir)))
 	       schema-dir