Home Documents for HTTP Services: XML SyntaxUC Berkeleydret@berkeley.eduhttp://dret.net/netdret/The current draft for HTTP Home Documents provides a JSON syntax only. This draft provides an XML syntax for the same underlying data model, so that the concept of HTTP Home Documents can be consistently exposed in both JSON- and XML-based HTTP services.Please discuss this draft on the apps-discuss mailing list.Online access to all versions and files is available on github.An Internet Draft currently under development proposes the concept of "Home Documents for HTTP APIs" and described 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 current draft only defines a JSON syntax. In order to make this concept available across representations, this draft defines an XML syntax for the concepts defined in .At this point it is undecided whether both drafts will be merged eventually, or whether they will both be published as separate documents. Regardless of the final publication setup, it should be noted that this draft is only defining the XML syntax, whereas all the concepts represented in this syntax are defined by .One notable difference is the handling of links found in "href" or "href-template" attributes on "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 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.The following Home Document in XML syntax uses the same data as the Home Document shown in Section 2 of (but adding xml:base="http://example.com" to demonstrate the mechanism):The mapping between JSON arrays and XML uses "item" elements <i/>, where each of those elements represents one array item. For properties that have a single values (i.e., they are not defined as an array of values), this value is directly contained as content in the corresponding element.Currently, the draft does not specify an extension model (how to represents hints that are not specified in the draft itself), and therefore the extension model for XML is currently undefined as well. The XML syntax will be updated to reflect the extension model once it has been specified for the JSON syntax.The following XML Schema is describing the XML shown in . Since there currently is no extension model, the XML Schema does currently not contain any extension points.This specification registers a media type for the XML syntax of Home Documents (as defined in ).The Internet media type for a Home Document in XML syntax is application/home+xml.Type name: applicationSubtype name: home+xmlRequired parameters: noneOptional parameters: Same as charset parameter for the media type "application/xml" as specified in RFC 3023 .Encoding considerations: Same as encoding considerations of media type "application/xml" as specified in RFC 3023 .Security considerations: This media type has all of the security considerations described in RFC 3023 and .Interoperability considerations: N/APublished specification: RFC XXXXApplications that use this media type: Applications that publish Home Documents for HTTP services using XML syntax.Additional information:
Magic number(s): N/AFile extension(s): XML documents should use ".xml" as the file extension.Macintosh file type code(s): TEXTPerson & email address to contact for further information: Erik Wilde <erik.wilde@emc.com>Intended usage: COMMONRestrictions on usage: noneAuthor: Erik Wilde <erik.wilde@emc.com>Change controller: IETFNote to RFC Editor: Please remove this section before publication.This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in RFC 6982 . The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.According to RFC 6982, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit"....The general security considerations for XML home documents are the same as those for JSON home documents, as described in the "Security Considerations" of . The specific security considerations introduced by XML as a representation format are described in the "Security Considerations" of .The move from a predefined list of hints to a hint registry is not yet reflected in the XML; in particular because the latest draft defines the hint data model to be JSON-specific.What is the extension model for the XML syntax? Should processing of other namespaces be defined as "should ignore", so that same-namespace extensions are encouraged?Should the XML syntax provide support for embedded human-readable documentation? This would probably not be supported in the JSON syntax, but could be marked as strictly optional and XML-specific.Note to RFC Editor: Please remove this section before publication.Updated author address.Adding "Implementation Status" section according to RFC 6982 .Adding support for @xml:base on the "resources" document element.Updated references from draft-nottingham-json-home-02 to draft-nottingham-json-home-03Added "Security Considerations" section.Added XSLT for transforming an XML Home Document to a simple HTML representation.Home Documents for HTTP APIsThis document proposes a "home document" format for non-browser HTTP clients. Note to Readers This draft should be discussed on the apps-discuss mailing list [1].XML Media TypesThis document standardizes five new media types - text/xml, application/xml, text/xml-external-parsed-entity, application/xml-external-parsed-entity, and application/xml-dtd - for use in exchanging network entities that are related to the Extensible Markup Language (XML). This document also standardizes a convention (using the suffix '+xml') for naming media types outside of these five types when those media types represent XML MIME (Multipurpose Internet Mail Extensions) entities. [STANDARDS-TRACK]Media Type Specifications and Registration ProceduresThis document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols. This memo documents an Internet Best Current Practice.Extensible Markup Language (XML) 1.0 (Fifth Edition)XML Base (Second Edition)XSL Transformations (XSLT) Version 1.0Associating Style Sheets with XML documents 1.0 (Second Edition)Improving Awareness of Running Code: The Implementation Status SectionThis document describes a simple process that allows authors of Internet-Drafts to record the status of known implementations by including an Implementation Status section. This will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.</t><t> The process in this document is offered as an experiment. Authors of Internet-Drafts are encouraged to consider using the process for their documents, and working groups are invited to think about applying the process to all of their protocol specifications. The authors of this document intend to collate experiences with this experiment and to report them to the community.The following XSLT 1.0 stylesheet transforms XML Home Documents to very simple HTML renditions. By associating this stylesheet with an XML Home Document, it is possible to serve XML Home Documents that will be rendered in a human-friendly way when viewed in a browser.