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

From The SBN Wiki
Jump to navigation Jump to search
(→‎<record_delimiter>: Update for IM 1.4.0.0)
Line 73: Line 73:
 
''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 13:38, 29 April 2015

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.