Difference between revisions of "Filling Out the File Area Text Class"

From The SBN Wiki
Jump to navigation Jump to search
m
(Update for Release 1.0)
Line 1: Line 1:
The '''''<File_Area_Text>''''' is a specific flavor of the more general ''<File_Are>'' class, designed for pointing to text files (like ''ReadMe'' files) associated with things like Bundles.  
+
The '''''<File_Area_Text>''''' is a specific flavor of the more general ''<File_Area>'' class, designed for pointing to text files (like ''ReadMe'' files) associated with things like Bundles.  
  
 
Note that the text file described by this class must have carriage-return/linefeed line delimiters.
 
Note that the text file described by this class must have carriage-return/linefeed line delimiters.
Line 45: Line 45:
 
</pre>
 
</pre>
  
=== &lt;external_standard_id&gt; ===
+
=== &lt;parsing_standard_id&gt; ===
  
 
''REQUIRED''
 
''REQUIRED''
Line 51: Line 51:
 
The value should identify the standard that tells you how to read the information in the file.   
 
The value should identify the standard that tells you how to read the information in the file.   
  
{| class="wikitable" style="background-color: thistle"
+
{| class="wikitable" style="background-color: yellow"
| '''''Note:''''' ''There should be a standard value list for this, but there isn't one yet. Until there is, use '''UTF-8 Text''', to indicate flat text. If you have something other than a flat text file that you're trying the describe with a ''&lt;File_Area_Text&gt;'' class, contact your PDS consultant for additional values.''
+
| '''Note:''' There should be a standard value list for this, but there isn't.  
 +
Until there is, use one of these or ask for advice:
 +
* If you have a simple ASCII text file, use "7-Bit ASCII Text".
 +
* If you have a simple UTF-8 text file, use "UTF-8 Text".
 +
* If you have an HTML file but don't know what standard it's coded to, use "HTML 4.0".
 +
* If you have an HTML file and you do know what standard it's coded to, use the closest thing from this list:
 +
** HTML 2.0
 +
** HTML 3.2
 +
** HTML 4.0
 +
** HTML 4.1
 
|}
 
|}
 
=== &lt;encoding_type&gt; ===
 
 
''REQUIRED''
 
 
This must have the value '''Character'''.  I realize this doesn't make a lot of sense, but it makes the validators happy.
 
  
 
=== &lt;description&gt; ===
 
=== &lt;description&gt; ===
Line 71: Line 74:
 
''REQUIRED''
 
''REQUIRED''
  
This must have the value '''carriage_return line_feed'''.  The corresponding text must also have carriage-return/linefeed delimited lines.
+
This must have the value '''carriage-return line-feed'''.  The corresponding text must also have carriage-return/linefeed delimited lines.

Revision as of 17:41, 29 May 2013

The <File_Area_Text> is a specific flavor of the more general <File_Area> class, designed for pointing to text files (like ReadMe files) associated with things like Bundles.

Note that the text file described by this class must have carriage-return/linefeed line delimiters.

<File>

REQUIRED

This class is handled identically in all the File_Area_* classes. It is described in detail in the Filling Out the File Class page.

<Stream_Text>

REQUIRED

This class provides metadata for the file referenced in the associated File class. There must be exactly one instance of this class in a File_Area_Text.

<name>

OPTIONAL

The name of the file itself is contained in the file_name attribute, which is required. So in general this attribute should only be used to provide something like a human-readable title for the contents of the file.

<local_identifier>

OPTIONAL

Use this if you need to create an identifier for this text data so you can reference it from other places in the label.

<offset>

REQUIRED

This is the offset, in bytes, into the file at which the text begins. This value should pretty much always be zero - talk to your PDS consultant if you have a case where you believe this isn't true. In any event, you must specify "bytes" as the unit for this attribute, thus:

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

<object_length>

OPTIONAL

This is the length of the text, in bytes. If the offset is zero, this should be the length of the file. You must specify "bytes" as the unit for this attribute, thus:

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

<parsing_standard_id>

REQUIRED

The value should identify the standard that tells you how to read the information in the file.

Note: There should be a standard value list for this, but there isn't.

Until there is, use one of these or ask for advice:

  • If you have a simple ASCII text file, use "7-Bit ASCII Text".
  • If you have a simple UTF-8 text file, use "UTF-8 Text".
  • If you have an HTML file but don't know what standard it's coded to, use "HTML 4.0".
  • If you have an HTML file and you do know what standard it's coded to, use the closest thing from this list:
    • HTML 2.0
    • HTML 3.2
    • HTML 4.0
    • HTML 4.1

<description>

OPTIONAL

This attribute provides a place for free-format text comments on the text file, if any.

<record_delimiter>

REQUIRED

This must have the value carriage-return line-feed. The corresponding text must also have carriage-return/linefeed delimited lines.