Skip to content

Commit 8d16b76

Browse files
committed
Add rules for Array_1D_Spectrum
1 parent 8d1e91c commit 8d16b76

4 files changed

Lines changed: 758 additions & 8 deletions

File tree

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Spectral Discipline Namespace Change Log
22

3+
## Changes from v1.3.2.0.to v1.3.2.1
4+
5+
Added rules for Array_1D_Spectrum that were overlooked in [CCB#42](https://github.com/NASA-PDS/PDS4-CCB/issues/42).
6+
Added VALID and FAIL tests for Array_1D_Spectrum.
7+
38
## Changes from v1.3.1.1 to v1.3.2.0
49

510
### Issue #278: Port Documentation

src/PDS4_SPECTRAL_IngestLDD.xml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<?xml-model href="http://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1H00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?>
2+
<?xml-model href="http://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1O00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?>
33

44
<Ingest_LDD xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 http://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1H00.xsd">
5+
xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 http://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1O00.xsd">
66
<name>Spectral Discipline Dictionary</name>
7-
<ldd_version_id>1.3.2.0</ldd_version_id>
7+
<ldd_version_id>1.3.2.1</ldd_version_id>
88
<dictionary_type>Discipline</dictionary_type>
99
<full_name>Anne Raugh</full_name>
1010
<steward_id>sbn</steward_id>
@@ -44,8 +44,11 @@
4444
2024-04-02 ACR Version 1.3.2.0 Clearing some additional issues from the queue:
4545
Issue #275: Conside units when comparing values of first_center_*
4646
and last_center_*
47+
2025-10-21 MJTM Version 1.3.2.1 Bug fix – add missing schematron rules for Array_1D_Spectrum
48+
(Overlooked in CCB#42)
49+
4750
</comment>
48-
<last_modification_date_time>2024-04-02</last_modification_date_time>
51+
<last_modification_date_time>2025-10-21</last_modification_date_time>
4952
<!--
5053
This file also contains extensive comments to illustrate various techniques available to those
5154
creating input IngestLDD files for local dicitionaries.
@@ -3087,14 +3090,14 @@
30873090
The empty parentheses are required. This ensures that if the local_reference_type check fails
30883091
(i.e., we're not looking at an array type), no message is reported.
30893092
-->
3090-
<rule_test>if (pds:local_reference_type = ('spectral_characteristics_to_array_object')) then ($objtype = ('Array_2D_Spectrum', 'Array_3D_Spectrum')) else true()</rule_test>
3093+
<rule_test>if (pds:local_reference_type = ('spectral_characteristics_to_array_object')) then ($objtype = ('Array_1D_Spectrum', 'Array_2D_Spectrum', 'Array_3D_Spectrum')) else true()</rule_test>
30913094
<!--
30923095
Because this is an Assert-type test, this message will be printed if the test fails.
30933096
Another aspect of "good citizenship" is making it easy for the user to see and correct
30943097
what he did wrong, so including the full list of valid values for something like this
30953098
is strongly recommended.
30963099
-->
3097-
<rule_message>The Array-type object referenced by sp:Spectral_Characteristics must be either an Array_2D_Spectrum or an Array_3D_Spectrum.</rule_message>
3100+
<rule_message>The Array-type object referenced by sp:Spectral_Characteristics must be either an Array_1D_Spectrum, Array_2D_Spectrum, or an Array_3D_Spectrum.</rule_message>
30983101
<!--
30993102
This is an optional description field for your own use. It is not propagated to the
31003103
Schematron or Schema files created.
@@ -3152,8 +3155,8 @@
31523155
</DD_Rule_Statement>
31533156
<DD_Rule_Statement>
31543157
<rule_type>Assert</rule_type>
3155-
<rule_test>if (string(node()) = '1D') then ($objtype = ('Table_Character','Table_Binary','Table_Delimited')) else true()</rule_test>
3156-
<rule_message>sp:spectrum_format of '1D' must be used with a table-type object.</rule_message>
3158+
<rule_test>if (string(node()) = '1D') then ($objtype = ('Array_1D_Spectrum', 'Table_Character','Table_Binary','Table_Delimited')) else true()</rule_test>
3159+
<rule_message>sp:spectrum_format of '1D' must be used with an Array_1D_Spectrum-type object or a table-type object.</rule_message>
31573160
</DD_Rule_Statement>
31583161
<DD_Rule_Statement>
31593162
<rule_type>Assert</rule_type>

0 commit comments

Comments
 (0)