Difference between revisions of "Filling Out the Table Delimited Data Structure"

From The SBN Wiki
Jump to navigation Jump to search
m
(Fix parsing_standard_id; make record_delimiter more explicit.)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''''<Table_Delimited>''''' class describes contains the information needed to parse a string of character bytes in a delimited table format into s table structure in programmatic memory.  It is very similar to the ''<Table_Character>'', the principal difference being on the I/O end of things - ''Table_Character'', as a fixed-width table, could potentially allow users to directly access individual rows and fields directly; ''Table_Delimited'' allows only serial access to the records and fields.
+
The '''''<Table_Delimited>''''' class contains the information needed to parse a string of character bytes in a delimited table format into a table structure in programmatic memory.  It is very similar to the ''<Table_Character>'', the principal difference being on the I/O end of things - ''Table_Character'', as a fixed-width table, could potentially allow users to directly access individual rows and fields; ''Table_Delimited'' allows only serial access to the rows and fields.
  
'''''N.B.:''''' PDS is in the process of defining a standard comprising parsing rules for extracting tabular data from a text file with delimited fields and records.  That standard defines the I/O processing for the ''<Table_Delimited>'' data.
+
'''N.B.:''' ''PDS has defined a standard comprising parsing rules for extracting tabular data from a text file with delimited fields and records, identified as ''"PDS DSV 1"'' in labels.  That standard defines the I/O processing for the ''<Table_Delimited>'' data described below.''
  
 
For additional explanation, see the PDS4 ''Standards Reference'', or contact your PDS node consultants.
 
For additional explanation, see the PDS4 ''Standards Reference'', or contact your PDS node consultants.
  
Following are the attributes and subclasses you'll find in ''<Table_Character>'', in label order.
+
Following are the attributes and subclasses you'll find in ''<Table_Delimited>'', in label order.
  
 
''Note that in the PDS4 master schema, all classes have capitalized names; attributes never do.''
 
''Note that in the PDS4 master schema, all classes have capitalized names; attributes never do.''
Line 20: Line 20:
  
 
If you need to reference this ''<Table_Delimited>'' from elsewhere in the same label, give it an identifier here.  If the identifier uses the same syntax as an average variable name in a typical programming language, you should be OK syntactically.
 
If you need to reference this ''<Table_Delimited>'' from elsewhere in the same label, give it an identifier here.  If the identifier uses the same syntax as an average variable name in a typical programming language, you should be OK syntactically.
 +
 +
== <md5_checksum> ==
 +
 +
''OPTIONAL''
 +
 +
Use this attribute to provide the MD5 checksum of the object ''only''.  If the object occupies the entire file, then the checksum should be given as an attribute of the ''<File>'' object.  This checksum should be calculated using ''only'' the bytes defined as being part of this table.
  
 
== <offset> ==
 
== <offset> ==
Line 34: Line 40:
 
''OPTIONAL''
 
''OPTIONAL''
  
If you know the total length of the ''Table_Delimited'' data, including all delimiter, line break characters and filler space, you can list it here. You must include a unit of bytes for this value. For example:
+
If you know the total length of the ''Table_Delimited'' data, including all delimiters, line break characters and filler space, you can list it here. You must include a unit of bytes for this value. For example:  
 
<pre>
 
<pre>
     <object_size unit="byte">10240</object_size>
+
     <object_length unit="byte">10240</object_length>
 
</pre>
 
</pre>
  
== &lt;external_standard_id&gt; ==
+
== &lt;parsing_standard_id&gt; ==
 
 
''REQUIRED''
 
 
 
This attribute must have the standard value '''PDS_DSV V1.0'''.
 
 
 
== &lt;encoding_type&gt; ==
 
  
 
''REQUIRED''
 
''REQUIRED''
  
This attribute must have the standard value '''Character'''.
+
This attribute must have the standard value '''PDS DSV 1'''.
  
 
== &lt;description&gt; ==
 
== &lt;description&gt; ==
Line 67: Line 67:
 
''REQUIRED''
 
''REQUIRED''
  
This attribute must contain the standard value '''carriage_return line_feed'''.  Note the the data must have carriage-return/linefeed delimited records.
+
This attribute must contain the standard value '''Carriage-Return Line-Feed'''.  Note that the data must have carriage-return and line-feed delimited records.
  
 
== &lt;field_delimiter&gt; ==
 
== &lt;field_delimiter&gt; ==
Line 74: Line 74:
  
 
This must have one of the standard values:
 
This must have one of the standard values:
* '''comma'''
+
* '''Comma'''
* '''horizontal_tab'''
+
* '''Horizontal Tab'''
* '''semicolon'''
+
* '''Semicolon'''
* '''vertical_bar''''
+
* '''Vertical Bar'''
  
Note that the parsing rules standard will contain additional information about leading and trailing blanks, possible additional delimiters around text fields, the significance of leading and trailing space, and so on.
+
Note that the parsing rules standard will contain additional information about leading and trailing blanks in the record, possible additional delimiters around text fields, the significance of leading and trailing space in a field, and so on.
  
 
== &lt;Uniformly_Sampled&gt; ==
 
== &lt;Uniformly_Sampled&gt; ==
Line 85: Line 85:
 
''OPTIONAL''
 
''OPTIONAL''
  
If the records comprising the ''Table_Delimited'' are evenly spaced through some dimension (like time, distance, wavelength, etc.), use this class to define that dimension and spacing. For details on using this class, see [[Filling_Out_the_Table_Character_Data_Structure#.3CUniformly_Sampled.3E|Filling Out the Table Character Data Structure - Uniformly_Sampled]] section.
+
If this ''Table_Delimited'' contains records which are uniformly spaced in some dimension (time, wavelength, distance, etc.), you can use this class to define that dimension and interval rather than including an additional field in each row to hold the value explicitly. The details are on the [[Filling Out the Uniformly Sampled Class]] page.
  
 
== &lt;Record_Delimited&gt; ==
 
== &lt;Record_Delimited&gt; ==
Line 95: Line 95:
 
=== &lt;fields&gt; ===
 
=== &lt;fields&gt; ===
  
 +
''REQUIRED''
 +
 +
The number of ''Field_Delimited'' classes directly under (that is, in the first nesting level of) the ''Record_Delimited'' class. Do '''''not''''' count ''Field_Delimited'' classes nested under ''Group_Field_Delimited'' classes.
  
''REQUIRED''
+
If your ''Record_Delimited'' contains only one or more ''Group_Field_Delimited'' classes, this will have a value of zero.
 +
 
 +
=== &lt;groups&gt; ===
 +
 
 +
''REQUIRED''  
  
The number of fields in the ''Record''.
+
The number of ''Group_Field_Delimited'' classes directly under (that is, in the first nesting level of) the ''Record_Delimited'' class. Do '''''not''''' count ''Group_Field_Delimited'' classes nested under other ''Group_Field_Delimited'' classes.
  
{| class="wikitable" style="backgound-color: thistle
+
If your ''Record_Delimited'' contains only one or more ''Field_Delimited'' classes, this will have a value of zero.
| '''''Note:''''' ''There is some controversy about what this value should be when ''Group Fields'' are present.  For the time being, use the data dictionary definition - the number of fields in the record is the total number of scalar values in the record; so it is the sum of all ''Field'' definitions in the record, and the number of ''Field'' definitions in each ''Group Field'' multiplied by the ''repetitions'' value of that group.''
 
|}
 
  
 
=== &lt;maximum_record_length&gt; ===
 
=== &lt;maximum_record_length&gt; ===
  
''REQUIRED''
+
''OPTIONAL''
  
 
The length of the longest single record in the ''Table_Delimited'' data, including all fields, all repetitions of group fields, any space between fields, and the record delimiters.  You must specify a unit of bytes for this value:
 
The length of the longest single record in the ''Table_Delimited'' data, including all fields, all repetitions of group fields, any space between fields, and the record delimiters.  You must specify a unit of bytes for this value:
Line 113: Line 118:
 
</pre>
 
</pre>
  
:{| class="wikitable" style="background-color: khaki"
+
----
|
+
=== A Note about '''Fields''' and '''Group Fields''' ===
: Records are composed of ''Fields'' and ''Group Fields''. A ''Record'' must have at least one of those, and can have an arbitrary number of them, in any order (that is, you can have ''Fields'' and ''Group Fields'' interspersed).
+
 
 +
Records are composed of ''Fields'' and ''Group Fields''. A ''Record'' must have  
 +
at least one of those (either will do), and can have an arbitrary number of them, in any order (that is, you can have ''Fields'' and ''Group Fields'' interspersed). Note, however, that ''Group Fields'' are '''''never''''' necessary - they are a notational convenience to save writing out large numbers of essentially identical ''Field'' definitions.
  
: There are currently serious arguments  underway associated with using ''Group Fields'', in particular when attempting to determine the correct value for the required ''&lt;fields&gt;'' attribute, above.  Because of this, SBN data preparers should not use ''Group Fields'' until the disagreements have been solved.  ''Group Fields'' are '''''never''''' necessary - they are a notational convenience to save writing out large numbers of similar ''Field'' definitions.
+
{| class="wikitable" style="background-color: lightcyan"
 +
|
 +
: SBN data preparers should '''''never''''' use a ''Group Field'' where a reasonable set of ''Fields'' will do. In particular, no ''Group Field'' should have a ''&lt;repetitions&gt;'' count of less than 2 in any SBN data product. If you have data that seem like they should be an exception, please contact your SBN data consultant with the details.
 
|}
 
|}
 +
 +
----
  
 
=== &lt;Field_Delimited&gt; ===
 
=== &lt;Field_Delimited&gt; ===
Line 134: Line 145:
 
''OPTIONAL''
 
''OPTIONAL''
  
This is the sequential number of the ''Field'' definition. This is poorly defined when ''Group Fields'' are present, and should probably not be used at all in that case.  The ''field_number'' is intended to be a help to human readers trying to map field definitions to columns in a print-out of the ''Table''.  
+
This is the sequential number of the ''Field_Delimited'' definition. For SBN data products, the ''field_number'' is intended to be a help to human readers trying to map field definitions to columns in a print-out of the ''Table''.
  
{| class="wikitable" style="background-color: thistle"
+
{| class="wikitable" style="background-color: lightcyan"
| '''''Note:''''' ''The fact that this attribute it optional is potentially problematic in a delimited table.  Since there is no ''&lt;field_location&gt;'' to use to determine field order, in the absence of this attribute field order in the file must be inferred from the order of the ''&lt;Field_Delimited&gt;'' classes.  Fortunately, XML is inherently ordered, so the obvious thing to do does the right thing (though ''Group_Field_Delimited'' classes increase the complexity and likelihood of unpleasant surprises); but this is a logical hole in the model, which is supposed to be implementation-agnostic.''
+
|  
 
+
: The ''Standards Reference'' lays out rules for using the ''field_number'' in cases where there are ''Group_Field_Delimited''s present which can be useful in programmatic contexts, but not so much in the visual-inspection case.
''Until this point is addressed, SBN strongly suggests you include ''field_sequence_numbers'' in you ''Field_Delimited'' classes.
 
 
|}
 
|}
  
Line 157: Line 167:
 
</pre>
 
</pre>
  
 
+
{| class="wikitable" style="background-color: yellow"  
{| class="wikitable" style="background-color: thistle"
+
|
'''''Note:''''' ''This value is ambiguous within the context of a ''&lt;Group_Field_Delimited&gt;'' class.''|}
+
'''''Note:''''' ''This value is slightly ambiguous within the context of a scalar field within a ''&lt;Group_Field_Delimited&gt;'' class. It should be the maximum length of a single scalar value, ''not'' the maximum length of all the repetitions of the value within a group.''
 +
|}
  
 
==== &lt;field_format&gt; ====
 
==== &lt;field_format&gt; ====
Line 165: Line 176:
 
''OPTIONAL''
 
''OPTIONAL''
  
The value of this attribute is a string representing the read/print format for the data in the field, using a subset of the POSIX print conventions.
+
The value of this attribute is a string representing the read/print format for the data in the field, using a subset of the POSIX print conventions defined in the ''Standards Reference'', and also described on the [[PDS4 field format Conventions]] page.
  
{| class="wikitable" style="background-color: thistle"
+
{| class="wikitable" style="background-color: lightcyan"
|'''''Note:''''' ''The syntax of the content of this field is poorly defined in the current data dictionary.
+
|
|}
+
SBN will require that this attribute be present in '''all''' ''Field'' definitions. It is used for validation of the ''Table'' contents.
 
 
The SBN has defined a subset of the POSIX standard for use in SBN data sets on the [[PDS4_field_format_Conventions]] page.
 
 
 
{| class="wikitable" style="background-color: khaki"
 
| SBN will require that this attribute be present in '''all''' ''Field'' definitions. It is used for validation of the ''Table'' contents.
 
 
|}
 
|}
  
Line 189: Line 195:
 
''OPTIONAL''
 
''OPTIONAL''
  
If the data in this field are scaled, this attribute should contain the value the data must be multiplied by to get back to the original value.  Scaling factors are applied prior to adding any offset.
+
If the data in this field are scaled, this attribute should contain the value by which the data must be multiplied to get back to the original value.  Scaling factors are applied prior to adding any offset.
  
 
==== &lt;value_offset&gt; ====
 
==== &lt;value_offset&gt; ====
Line 203: Line 209:
 
Free-format text describing the content of the field.
 
Free-format text describing the content of the field.
  
'''''Note:''''' While not required, SBN expects to see a useful definition for every ''Field'', as do both reviewers and users.  Omit this field at your peril.
+
'''''Note:''''' While not required, SBN expects to see a useful definition for every ''Field'', as do both reviewers and users.  Omit this attribute at your peril.
  
 
==== &lt;Special_Constants&gt; ====
 
==== &lt;Special_Constants&gt; ====
Line 216: Line 222:
 
* ''unknown_constant''
 
* ''unknown_constant''
 
* ''not_applicable_constant''
 
* ''not_applicable_constant''
 
+
* ''valid_maximum''
 +
* ''high_instrument_saturation''
 +
* ''high_representation_saturation''
 +
* ''valid_minimum''
 +
* ''low_instrument_saturation''
 +
* ''low_representation_saturation''
  
 
==== &lt;Field_Statistics&gt; ====
 
==== &lt;Field_Statistics&gt; ====
Line 232: Line 243:
 
=== &lt;Group_Field_Delimited&gt; ===
 
=== &lt;Group_Field_Delimited&gt; ===
  
This class defines a set of ''Fields'' that repeats a given number of times in each record.  Unlike in fixed-width tables, in a delimited table ''Group Fields'' may '''''not''''' be nested.
+
This class defines a set of ''Field_Delimited'' and nested ''Group_Field_Delimited'' classes that repeats a given number of times in each record.   
 +
 
 +
{| class="wikitable" style="background-color: lightcyan"
 +
| '''''Note:''''' Unless you have three good reasons, don't use ''Group_Field_Delimited'' in SBN data.
 +
|}
 +
 
 +
==== &lt;name&gt; ====
 +
 
 +
''OPTIONAL''
  
'''''Note:''''' Unless you have three good reasons, don't use ''Group Fields'' in SBN data.
+
If you'd like to give your group a name, this is the place to do it.  Names are often useful for helping users quickly understand what relationship the repeating fields have with each other.
  
 +
==== &lt;group_number&gt; ====
  
{| class="wikitable" style="background-color: thistle"
+
''OPTIONAL''
| '''''NOTE:''''' ''While I can easily understand the general case for not allowing nested ''Group_Fields'' in any table, I don't see a good reason for allowing them in fixed-width tables and forbidding them in delimited tables.''
+
 
|}
+
Analogous to ''field_number'' for scalar fields, this is a sequential number useful for referencing ''Group_Field_Delimited'' classes at a single nesting level of a complex ''Record_Delimited'' definition.
  
 
==== &lt;repetitions&gt; ====
 
==== &lt;repetitions&gt; ====
Line 245: Line 265:
 
''REQUIRED''
 
''REQUIRED''
  
The number of times the complete set of ''Fields'' comprising this ''&lt;Group_Field_Delimited&gt;'' repeats.
+
The number of times the complete set of ''Field_Delimited''s and ''Group_Field_Delimited''s comprising this ''&lt;Group_Field_Character&gt;'' repeats.
  
{| class="wikitable" style="background-color: thistle"
+
{| class="wikitable" style="background-color: lightcyan"
| '''''Note:''''' ''The minimum value for this field listed in the data dictionary is one, but no product will pass SBN review unless this value is at least two.''
+
| '''''Note:''''' ''The minimum value for this field listed in the data dictionary is one, but it is unlikely that a product will pass SBN review unless this value is at least two.''
 
|}
 
|}
  
Line 255: Line 275:
 
''REQUIRED''
 
''REQUIRED''
  
This proper way the calculate the value for this attribute is the subject of debate as I type this. For the time being, follow the rules in the data dictionary: Count the number of ''&lt;Field_Delimited&gt;'' classes in the group; then multiply by the value of ''&lt;repetitions&gt;'' for the group field.
+
The count of ''Field_Delimited'' classes directly under (i.e., at the first nesting level below) the ''Group_Field_Delimited'' definition. This will be zero if the group contains no ''Field_Delimited'' classes.
 +
 
 +
==== &lt;groups&gt; ====
 +
 
 +
''REQUIRED''
 +
 
 +
The count of ''Group_Field_Delimited'' classes directly under (i.e., at the first nesting level below) the present ''Group_Field_Delimited'' definition. This will be zero if the group contains no nested ''Group_Field_Delimited'' classes.
 +
 
 +
==== &lt;description&gt; ====
 +
 
 +
''OPTIONAL''
 +
 
 +
This free-format text field is available to provide additional text about why this group exists or what it represents.
  
==== &lt;Fields_Delimited&gt; ====
+
==== Fields and Nested Groups ====
  
As in the ''Record_Delimited'', the ''Group_Field_Delimited'' contains a series of ''Field_Delimited'' classes. There must be at least one. The ''&lt;Field_Delimited&gt;'' classes inside a ''Group_Field_Delimited'' have the same structure and constraints (and issues) as the those in the ''Record_Delimited''.
+
As in the ''Record_Delimited'', the ''Group_Field_Delimited'' may contain either ''Field_Delimited'' classes, or ''Group_Field_Delimited'' classes, or both intermixed. ''Group_Field_Delimited'' classes may be nested arbitrarily deeply. The requirements for these data structure classes inside a ''&lt;Group_Field_Delimited&gt;'' are identical to those above.

Latest revision as of 00:39, 6 February 2019

The <Table_Delimited> class contains the information needed to parse a string of character bytes in a delimited table format into a table structure in programmatic memory. It is very similar to the <Table_Character>, the principal difference being on the I/O end of things - Table_Character, as a fixed-width table, could potentially allow users to directly access individual rows and fields; Table_Delimited allows only serial access to the rows and fields.

N.B.: PDS has defined a standard comprising parsing rules for extracting tabular data from a text file with delimited fields and records, identified as "PDS DSV 1" in labels. That standard defines the I/O processing for the <Table_Delimited> data described below.

For additional explanation, see the PDS4 Standards Reference, or contact your PDS node consultants.

Following are the attributes and subclasses you'll find in <Table_Delimited>, in label order.

Note that in the PDS4 master schema, all classes have capitalized names; attributes never do.

<name>

OPTIONAL

If you'd like to give your table a name, do it here.

<local_identifier>

OPTIONAL

If you need to reference this <Table_Delimited> from elsewhere in the same label, give it an identifier here. If the identifier uses the same syntax as an average variable name in a typical programming language, you should be OK syntactically.

<md5_checksum>

OPTIONAL

Use this attribute to provide the MD5 checksum of the object only. If the object occupies the entire file, then the checksum should be given as an attribute of the <File> object. This checksum should be calculated using only the bytes defined as being part of this table.

<offset>

REQUIRED

This is the offset, in bytes, from the beginning of the file to the beginning of the Table_Delimited data. Offsets begin at zero. You must indicate a unit of bytes for this attribute:

    <offset unit="byte">1234567890</offset>

<object_length>

OPTIONAL

If you know the total length of the Table_Delimited data, including all delimiters, line break characters and filler space, you can list it here. You must include a unit of bytes for this value. For example:

    <object_length unit="byte">10240</object_length>

<parsing_standard_id>

REQUIRED

This attribute must have the standard value PDS DSV 1.

<description>

OPTIONAL

This is a free-format text field for any additional comments you might care to include at this point.

<records>

REQUIRED

This attribute must contain the total number of records in the Table_Delimited data.

<record_delimiter>

REQUIRED

This attribute must contain the standard value Carriage-Return Line-Feed. Note that the data must have carriage-return and line-feed delimited records.

<field_delimiter>

REQUIRED

This must have one of the standard values:

  • Comma
  • Horizontal Tab
  • Semicolon
  • Vertical Bar

Note that the parsing rules standard will contain additional information about leading and trailing blanks in the record, possible additional delimiters around text fields, the significance of leading and trailing space in a field, and so on.

<Uniformly_Sampled>

OPTIONAL

If this Table_Delimited contains records which are uniformly spaced in some dimension (time, wavelength, distance, etc.), you can use this class to define that dimension and interval rather than including an additional field in each row to hold the value explicitly. The details are on the Filling Out the Uniformly Sampled Class page.

<Record_Delimited>

REQUIRED

This class defines the repeating series of fields contained in one complete record of the Table_Delimited data.

<fields>

REQUIRED

The number of Field_Delimited classes directly under (that is, in the first nesting level of) the Record_Delimited class. Do not count Field_Delimited classes nested under Group_Field_Delimited classes.

If your Record_Delimited contains only one or more Group_Field_Delimited classes, this will have a value of zero.

<groups>

REQUIRED

The number of Group_Field_Delimited classes directly under (that is, in the first nesting level of) the Record_Delimited class. Do not count Group_Field_Delimited classes nested under other Group_Field_Delimited classes.

If your Record_Delimited contains only one or more Field_Delimited classes, this will have a value of zero.

<maximum_record_length>

OPTIONAL

The length of the longest single record in the Table_Delimited data, including all fields, all repetitions of group fields, any space between fields, and the record delimiters. You must specify a unit of bytes for this value:

    <record_length unit="byte">1234</record_length>

A Note about Fields and Group Fields

Records are composed of Fields and Group Fields. A Record must have at least one of those (either will do), and can have an arbitrary number of them, in any order (that is, you can have Fields and Group Fields interspersed). Note, however, that Group Fields are never necessary - they are a notational convenience to save writing out large numbers of essentially identical Field definitions.

SBN data preparers should never use a Group Field where a reasonable set of Fields will do. In particular, no Group Field should have a <repetitions> count of less than 2 in any SBN data product. If you have data that seem like they should be an exception, please contact your SBN data consultant with the details.

<Field_Delimited>

The class defines a single scalar field.

<name>

REQUIRED

The name of the field. SBN recommends that this be something fairly human-readable that can be easily turned into a variable name for use in applications, or displayed as a meaningful column heading.

<field_number>

OPTIONAL

This is the sequential number of the Field_Delimited definition. For SBN data products, the field_number is intended to be a help to human readers trying to map field definitions to columns in a print-out of the Table.

The Standards Reference lays out rules for using the field_number in cases where there are Group_Field_Delimiteds present which can be useful in programmatic contexts, but not so much in the visual-inspection case.

<data_type>

REQUIRED

The type of the values in the field. This must be one of the values listed in the Standard Values Quick Reference.

<maximum_field_length>

OPTIONAL

The greatest number of bytes in the longest instance of this field in the delimited table. You must specify the unit:

    <maximum_field_length unit="byte">12</maximum_field_length>

Note: This value is slightly ambiguous within the context of a scalar field within a <Group_Field_Delimited> class. It should be the maximum length of a single scalar value, not the maximum length of all the repetitions of the value within a group.

<field_format>

OPTIONAL

The value of this attribute is a string representing the read/print format for the data in the field, using a subset of the POSIX print conventions defined in the Standards Reference, and also described on the PDS4 field format Conventions page.

SBN will require that this attribute be present in all Field definitions. It is used for validation of the Table contents.

<unit>

OPTIONAL

If the value in this field has an associated unit, this is where it goes. This value is case sensitive, and you may use characters from the UTF-8 character set (like the Angstrom symbol) where appropriate.

Note: If a field contains a unitless value, then there should be no <unit> attribute. NEVER include a null unit value, or even worse, this: <unit>N/A</unit>.

<scaling_factor>

OPTIONAL

If the data in this field are scaled, this attribute should contain the value by which the data must be multiplied to get back to the original value. Scaling factors are applied prior to adding any offset.

<value_offset>

OPTIONAL

If the values in the field have been shifted by an offset, this attribute should contain the value that must be added to each field value to get back to the original value. Offsets and added after the scaling factor, if any.

<description>

OPTIONAL

Free-format text describing the content of the field.

Note: While not required, SBN expects to see a useful definition for every Field, as do both reviewers and users. Omit this attribute at your peril.

<Special_Constants>

OPTIONAL

This class defines flag values used to indicate that a particular field value is unknown for one reason or another. It is identical to the <Special_Constants> class used in the Array classes. For details, check the Filling Out the Array 2D Data Structure - <Special_Constants> page. Here is a quick list of the special constants available in this class:

  • saturated_constant
  • missing_constant
  • error_constant
  • invalid_constant
  • unknown_constant
  • not_applicable_constant
  • valid_maximum
  • high_instrument_saturation
  • high_representation_saturation
  • valid_minimum
  • low_instrument_saturation
  • low_representation_saturation

<Field_Statistics>

OPTIONAL

If you want to include things like extrema, mean value, and such for all the values that occur in this field through all the records in the table, this is the place to do it. This class is identical for all Field types. For details, see Filling Out the Field Statistics Class. Here is a quick list of the field statistics available in this class:

  • maximum
  • minimum
  • mean
  • standard_deviation
  • median


<Group_Field_Delimited>

This class defines a set of Field_Delimited and nested Group_Field_Delimited classes that repeats a given number of times in each record.

Note: Unless you have three good reasons, don't use Group_Field_Delimited in SBN data.

<name>

OPTIONAL

If you'd like to give your group a name, this is the place to do it. Names are often useful for helping users quickly understand what relationship the repeating fields have with each other.

<group_number>

OPTIONAL

Analogous to field_number for scalar fields, this is a sequential number useful for referencing Group_Field_Delimited classes at a single nesting level of a complex Record_Delimited definition.

<repetitions>

REQUIRED

The number of times the complete set of Field_Delimiteds and Group_Field_Delimiteds comprising this <Group_Field_Character> repeats.

Note: The minimum value for this field listed in the data dictionary is one, but it is unlikely that a product will pass SBN review unless this value is at least two.

<fields>

REQUIRED

The count of Field_Delimited classes directly under (i.e., at the first nesting level below) the Group_Field_Delimited definition. This will be zero if the group contains no Field_Delimited classes.

<groups>

REQUIRED

The count of Group_Field_Delimited classes directly under (i.e., at the first nesting level below) the present Group_Field_Delimited definition. This will be zero if the group contains no nested Group_Field_Delimited classes.

<description>

OPTIONAL

This free-format text field is available to provide additional text about why this group exists or what it represents.

Fields and Nested Groups

As in the Record_Delimited, the Group_Field_Delimited may contain either Field_Delimited classes, or Group_Field_Delimited classes, or both intermixed. Group_Field_Delimited classes may be nested arbitrarily deeply. The requirements for these data structure classes inside a <Group_Field_Delimited> are identical to those above.