OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Schema for envelope model


Title: Schema for envelope model

Attached is a proposed schema for the XDI envelope model. I did this by hand, so it's probably not exactly right. A brief description of the elements defined by the schema and an example instance document follow.

Resource - Resource is the outermost element in the envelope model, i.e. it acts as the envelope that contains header information and data (or a reference to the data). A resource is composed of data in the Data element (required) and metadata in the Header element (optional). It can include any attributes as long as they are namespace qualified and come from an external namespace. An instance of a Resource element is sometimes called a "Resource Bundle".

Header - Header is a child of Resource that contains metadata about the data described by the Data element. It can contain any namespace qualified children, from either the target namespace or an external namespace. It can include attributes as long as they are namespace qualified and come from an external namespace. No specific headers are defined by this schema. Elements within the Header element describe the data in the Data element in a way specified by those individual elements. In other words, all we can say about children of Header is that they contain some sort of metadata about Data.

Data - Data is a child of resource that either contains or references data described by a resource bundle. It contains either a) arbitrary namespace-qualified XML from any namespace (including the target namespace) or b) a Reference element that describes some external XML by reference. It can include any attributes as long as they are namespace qualified and come from an external namespace.

Reference, Transforms, Transform - This set of elements describes a piece of XML by reference. It is a simplified version of Reference as defined by XML Digital Signature, and more information about Transforms can be found there. A reference is expressed as a URI (possibly a fragment only) with an optional set of transforms (typically an XPath expression) that further qualifies the target XML.

MustUnderstand - A global boolean attribute that is intended to be used by children of the Header element. Because header elements are arbitrary, the application processing the resource bundle may or may not understand them. If the MustUnderstand attribute is present and set to true on a particular Header element, the application consuming the resource bundle may make use of the Data element only if it is capable of understanding and processing that header element.


Here's an example (previously distributed) of a conforming instance document.

<xdi:Resource xmlns:xdi="urn:oasis:names:tc:XDI:1.0:resource">
  <xdih:Header xmlns:xdih="urn:oasis:names:tc:XDI:1.0:resource:headers">
    <xdih:Meta URI="#_1234" XPath="/purchaseOrder">
      <xdih:Address>xri://@w3c/xmlschema/po.xml</xdi:Address>
      <xdih:type>@dictionary/(+purchaseOrder)</xdi:Type>
      <xdih:Meta XPath="/purchaseOrder/shipTo">
        <xdih:Address>!2</xdi:Address>
        <xdih:Type>@dictionary/(+address)</xdi:Type>
        <xdih:Type>@dictionary/(+shippingAddress)</xdi:Type>
      <xdih:Meta>
      <xdih:Meta XPath="/purchaseOrder/billTo">
        <xdih:Address>!3</xdi:Address>
        <xdih:Type>@dictionary/(+address)</xdi:Type>
        <xdih:Type>@dictionary/(+billingAddress)</xdi:Type>
      </xdih:Meta>
      <xdih:Meta XPath="/purchaseOrder/comment">
        <xdih:Address>!4</xdi:Address>
      </xdih:Meta>
      <xdih:Meta XPath="/purchaseOrder/items">
        <xdih:Address>!5</xdi:Address>
        <xdih:Meta XPath="/purchaseOrder/items/item[1]">
          <xdih:Address>!1</xdi:Address>
        </xdih:Meta>
        <xdih:Meta XPath="/purchaseOrder/items/item[2]">
          <xdih:Address>!2</xdi:Address>
        </xdih:Meta>
      </xdih:Meta>
    </xdih:Meta>
  </xdi:Header>
  <xdi:Data>
    <purchaseOrder orderDate="1999-10-20" ID="_1234" xmlns="...">
      <shipTo country="US">
        <name>Alice Smith</name>
        <street>123 Maple Street</street>
        <city>Mill Valley</city>
        <state>CA</state>
        <zip>90952</zip>
      </shipTo>
      <billTo country="US">
        <name>Robert Smith</name>
        <street>8 Oak Avenue</street>
        <city>Old Town</city>
        <state>PA</state>
        <zip>95819</zip>
      </billTo>
      <comment>Hurry, my lawn is going wild<!/comment>
      <items>
        <item partNum="872-AA">
          <productName>Lawnmower</productName>
          <quantity>1</quantity>
          <USPrice>148.95</USPrice>
          <comment>Confirm this is electric</comment>
        </item>
        <item partNum="926-AA">
          <productName>Baby Monitor</productName>
          <quantity>1</quantity>
          <USPrice>39.98</USPrice>
          <shipDate>1999-05-21</shipDate>
        </item>
      </items>
    </purchaseOrder>
  </xdi:Data>
</xdi:Resource>

Dave

xdischema.xsd



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]