Package rst.xml

This package contains data types related to XML documents.

In particular, the types XOP and Attachment are inspired by

See also

XML-binary Optimized Packaging (XOP)
http://www.w3.org/TR/xop10/

Messages

digraph message_graph { fontname="Arial"; fontsize=11; stylesheet="../_static/graphs.css"; node [fontsize=11,fontname="Arial"] edge [fontsize=11,fontname="Arial"] "1" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-xml.html#rst.xml.XOPs" TITLE="Message rst.xml.XOPs" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">XOPs</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.XOP" TITLE="Message rst.xml.XOP" TARGET="_parent">XOP</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.XOPs.xops" TITLE="Field rst.xml.XOPs.xops" TARGET="_parent" PORT="xops">xops</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "2" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-xml.html#rst.xml.XOP" TITLE="Message rst.xml.XOP" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">XOP</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.XOP.xml" TITLE="Field rst.xml.XOP.xml" TARGET="_parent" PORT="xml">xml</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.Attachment" TITLE="Message rst.xml.Attachment" TARGET="_parent">Attachment</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.XOP.attachments" TITLE="Field rst.xml.XOP.attachments" TARGET="_parent" PORT="attachments">attachments</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.XOP.id" TITLE="Field rst.xml.XOP.id" TARGET="_parent" PORT="id">id</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "3" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-xml.html#rst.xml.Attachment" TITLE="Message rst.xml.Attachment" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">Attachment</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.Attachment.url" TITLE="Field rst.xml.Attachment.url" TARGET="_parent" PORT="url">url</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-OCTET-VECTOR.html#OCTET-VECTOR" TITLE="Fundamental OCTET-VECTOR" TARGET="_parent">OCTET-VECTOR</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.Attachment.wire_schema" TITLE="Field rst.xml.Attachment.wire_schema" TARGET="_parent" PORT="wire_schema">wire_schema</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-OCTET-VECTOR.html#OCTET-VECTOR" TITLE="Fundamental OCTET-VECTOR" TARGET="_parent">OCTET-VECTOR</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-xml.html#rst.xml.Attachment.data" TITLE="Field rst.xml.Attachment.data" TARGET="_parent" PORT="data">data</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "1":xops -> "2"[]; "2":attachments -> "3"[]; }

clearer: should be made invisible via css

Message XOPs

class rst.xml.XOPs

A collection of XML documents with optional binary attachments.

Code author: David Klotz <dklotz@techfak.uni-bielefeld.de>

xops
Type:array of rst.xml.XOP

The collection of XOP objects.

Download this file

message XOPs {

    /**
     * The collection of @ref rst.xml.XOP objects.
     */
    repeated XOP xops = 1;

}

Message XOP

class rst.xml.XOP

Objects of this type represent XML with binary attachments.

Thus, this type can be seen (and used) as an implementation of the XML-binary Optimized Packaging (XOP) recommendation. (Note that the draft calls this kind of object “XOP Package”).

See also

XML-binary Optimized Packaging (XOP)
http://www.w3.org/TR/xop10/

Code author: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>

xml
Type:ASCII-STRING

XML string (UTF-8 encoded).

Has to be valid XML since parsers and, potentially, validators might be applied.

attachments
Type:array of rst.xml.Attachment

Set of attachment objects.

Attachment objects are uniquely identifiable by means of their url fields.

The order of Attachment objects is not significant as they are indexed by URLs.

id
Type:UINT64

An optional document identifier.

Can be used e.g. to distinguish documents without looking at their content.

Download this file

message XOP {

    /**
     * XML string (UTF-8 encoded).
     *
     * Has to be valid XML since parsers and, potentially, validators
     * might be applied.
     */
    optional        string     xml         = 1;

    /**
     * Set of attachment objects.
     *
     * @ref .Attachment objects are uniquely identifiable by means of
     * their @ref .Attachment.url fields.
     *
     * The order of @ref .Attachment objects is not significant as
     * they are indexed by URLs.
     */
    repeated        Attachment attachments = 2;

    /**
     * An optional document identifier.
     *
     * Can be used e.g. to distinguish documents without looking at
     * their content.
     */
    optional        uint64     id          = 3;
}

Message Attachment

class rst.xml.Attachment

Uniquely identifiable object which is associated to a XOP.

The attachment is uniquely identified within the containing XOP object by its url.

In this implementation, the attached object is stored in a serialized form in the wire_schema and data fields.

Code author: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>

Todo

move to separate file?

url
Type:ASCII-STRING

URL of attachment.

Within a XOP object (and possibly beyond), each attachment should have a unique URL.

wire_schema
Type:OCTET-VECTOR

Wire-schema of the serialized object.

This field and the data field are intended to be processed by a (de)serialization mechanism that decodes/encodes the data blob according to the type information in wireSchema.

data
Type:OCTET-VECTOR

Blob data of the serialized object.

See wire_schema for details.

Download this file

message Attachment {

    /**
     * URL of attachment.
     *
     * Within a @ref .XOP object (and possibly beyond), each
     * attachment should have a unique URL.
     */
    optional        string     url         = 1;

    /**
     * Wire-schema of the serialized object.
     *
     * This field and the @ref .data field are intended to be
     * processed by a (de)serialization mechanism that decodes/encodes
     * the data blob according to the type information in wireSchema.
     */
    optional        bytes      wire_schema = 2;

    /**
     * Blob data of the serialized object.
     *
     * See @ref .wire_schema for details.
     */
    optional        bytes      data        = 3;
}