10.2 Virtual I/O Commands

A virtual file can contain a default datastream that is read or written if a normal read or write operation is posted against the file and no virtual I/O command has been received. All other read and write operations must be preceded by a virtual I/O command, which allows the requester to target either the transformation template of the file or a named datastream that has been defined for the file.

The following is the DTD for the XML used in virtual I/O commands:

<!ELEMENT virtualIO (datastream)|define|link)>
<!ELEMENT datastream EMPTY>
<!ATTLIST datastream
   name CDATA "default">
<!ELEMENT define EMPTY>
<>

The virtual I/O tags are interpreted as follows:

virtualIO

The main element. It must contain either a datastream or a define element.

define

Used when you wish to view or change the transformation template of a file through subsequent read and write operations.

datastream

Specifies that subsequent read and write operations will be on a virtual datastream. It has one optional attribute, name, which gives the name of the target datastream. The name must correspond to the name of one of the datastreams that is defined in the transformation template of the target file. If the name is not specified, the default datastream is used (the one in the transformation template that has no name), which is the same as if there is no virtual I/O command.