AntennaHouse / ahfsettings

Schema and Oxygen framework for Antenna House Formatter 'Option Settings File'
0 stars 0 forks source link

gs-add-options is renamed to gs-options in current AHF releases #3

Open juicejuice opened 1 week ago

juicejuice commented 1 week ago

Hi @tgraham-antenna, I would like to suggest the following patches. Sorry I don't have time today to fork and do a full pull request workflow, below is the set of patches for a simple fix.

From dbaf5ab0b91afd7b83a871fcf0dc5c9e14ab972c Mon Sep 17 00:00:00 2001
From: Gareth <gareth@shakewell.agency>
Date: Wed, 11 Sep 2024 07:58:59 +1000
Subject: [PATCH] The PDF settings attribute gs-add-options is now renamed to
 gs-options in current AHF releases, allow both for backwards compatibility

---
 schema/axs.dtd | 1 +
 schema/axs.rnc | 1 +
 schema/axs.rng | 3 +++
 schema/axs.xsd | 1 +
 4 files changed, 6 insertions(+)

diff --git a/schema/axs.dtd b/schema/axs.dtd
index 1401079..6f9b056 100644
--- a/schema/axs.dtd
+++ b/schema/axs.dtd
@@ -391,6 +391,7 @@ limitations under the License.
   grayscale-jpeg-quality-default %jpeg-quality.model; #IMPLIED
   grayscale-jpeg-quality-minimum %jpeg-quality.model; #IMPLIED
   gs-add-options CDATA #IMPLIED
+  gs-options CDATA #IMPLIED
   image-color-profile (%ah.boolean;) #IMPLIED
   image-compression NMTOKEN #IMPLIED
   image-downsampling NMTOKEN #IMPLIED
diff --git a/schema/axs.rnc b/schema/axs.rnc
index 74699dd..f353298 100644
--- a/schema/axs.rnc
+++ b/schema/axs.rnc
@@ -670,6 +670,7 @@ pdf-settings.attlist =
    attribute grayscale-jpeg-quality-default { jpeg-quality.model }?,
    attribute grayscale-jpeg-quality-minimum { jpeg-quality.model }?,
    attribute gs-add-options { text }?,
+   attribute gs-options { text }?,
    attribute image-color-profile { ah.boolean }?,
    attribute image-compression { xsd:NCName }?,
    attribute image-downsampling { xsd:NCName }?,
diff --git a/schema/axs.rng b/schema/axs.rng
index daf9baf..486f86d 100644
--- a/schema/axs.rng
+++ b/schema/axs.rng
@@ -1687,6 +1687,9 @@
     <optional>
       <attribute name="gs-add-options"/>
     </optional>
+    <optional>
+      <attribute name="gs-options"/>
+    </optional>
     <optional>
       <attribute name="image-color-profile">
         <ref name="ah.boolean"/>
diff --git a/schema/axs.xsd b/schema/axs.xsd
index abab46e..af038fe 100644
--- a/schema/axs.xsd
+++ b/schema/axs.xsd
@@ -1272,6 +1272,7 @@
     <xs:attribute name="grayscale-jpeg-quality-default" type="jpeg-quality.model"/>
     <xs:attribute name="grayscale-jpeg-quality-minimum" type="jpeg-quality.model"/>
     <xs:attribute name="gs-add-options"/>
+    <xs:attribute name="gs-options"/>
     <xs:attribute name="image-color-profile" type="ah.boolean"/>
     <xs:attribute name="image-compression" type="xs:NCName"/>
     <xs:attribute name="image-downsampling" type="xs:NCName"/>
-- 
2.41.0
tgraham-antenna commented 3 days ago
  1. Thanks.
  2. All that was really necessary was to modify axs.rnc, as the other schemas are generated from that. Which points to my needing to document how to do things.
  3. gs-add-options should have been gs-options all along, as the first public release was for Antenna House Formatter V7.2.4 and gs-add-options was removed and gs-options added in V7.1. I will make a new release.
juicejuice commented 3 days ago

Ah OK that makes sense, thanks!