Home Documents for HTTP APIs: XML Syntax

Document Type Active Internet-Draft (individual)
Last updated 2016-06-27
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                           E. Wilde
Internet-Draft                                             June 27, 2016
Intended status: Informational
Expires: December 29, 2016

                Home Documents for HTTP APIs: XML Syntax


   The specification for HTTP API Home Documents provides a JSON syntax
   only.  This specification provides an XML syntax for the same data
   model, so that the concept of Home Documents can be consistently
   exposed in both JSON- and XML-based HTTP APIs.  It also defines the
   link relation type "home" so that applications can identify links to
   home documents.

Note to Readers

   Please discuss this draft on the apps-discuss mailing list

   Online access to all versions and files is available on GitHub

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on December 29, 2016.

Copyright Notice

   Copyright (c) 2016 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

Wilde                   Expires December 29, 2016               [Page 1]
Internet-Draft             Home Documents XML                  June 2016

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

1.  Introduction

   "Home Documents for HTTP APIs" [I-D.nottingham-json-home] proposes
   the concept of "Home Documents" and describes them as follows:

   "This document proposes a 'home document' format for non-browser HTTP
   clients. [...] The goal of home documents is to serve as a starting
   point for hypermedia APIs, where clients need to have an entry point,
   and then can use the API by following links.  Home documents thus
   serve the same purpose as home pages on web sites: They are stable
   entry points that provide starting points for clients with some
   knowledge of the services linked from them."

   While this general concept of a home document is independent of the
   representation format, the specification only defines a JSON syntax.
   In order to make this concept available across representations, this
   specification defines an XML syntax for the concepts defined in

   One notable difference is the handling of links found in "href" or
   "href-template" attributes of "resource" elements: In the JSON
   syntax, these are (if they are relative URIs) resolved against the
   URI of the home document itself.  The XML syntax adds support for an
   optional "xml:base" attribute [W3C.REC-xmlbase-20090128] on the
   "resources" document element.  If this attribute is present, it has
   to be used according to its specification, and thus becomes part of a
   possible resolution chain of relative URIs.

2.  XML Example

   The following Home Document in XML syntax uses the same data as the
   Home Document shown in Section 2 [1] of [I-D.nottingham-json-home]
   (but adding xml:base="http://example.com" to demonstrate the

Wilde                   Expires December 29, 2016               [Page 2]
Internet-Draft             Home Documents XML                  June 2016

<?xml-stylesheet type="text/xsl" href="home-xml-02.xslt"?>
<resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:ietf:params:xml:ns:homedoc home-xml.xsd"
 xmlns="urn:ietf:params:xml:ns:homedoc" xml:base="tag:me@example.com,2016:">
Show full document text