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

From The SBN Wiki
Jump to navigation Jump to search
(Creation)
 
m
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 (liek ''ReadMe'' files) associated with things like Bundles.  
+
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.  
  
 
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.

Revision as of 21:47, 25 February 2013

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.

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>

<external_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 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 <File_Area_Text> class, contact your PDS consultant for additional values.

<encoding_type>

REQUIRED

This must have the value Character. I realize this doesn't make a lot of sense, but it makes the validators happy.

<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.