TOC 
Network Working GroupS. St.Laurent
Internet-DraftO'Reilly & Associates
Expires: April 28, 2003October 28, 2002

The XPointer xinclude1() Scheme
draft-stlaurent-xinclude-frag-00.txt

Status of this Memo

This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.

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."

The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt.

The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html.

This Internet-Draft will expire on April 28, 2003.

Copyright Notice

Copyright (C) The Internet Society (2002). All Rights Reserved.

Abstract

This document specifies an xinclude1() scheme for use in XPointer-based fragment identifiers. This scheme, like other XPointer Framework[12] schemes, is designed primarily for use with the XML Media Types defined in RFC 3023[5], to identify locations within a given XML representation of a resource. The xinclude1() scheme notifies an XPointer processor whether the creator of the XPointer intended for XInclude 1.0[9] processing to take place.



 TOC 

Table of Contents




 TOC 

1. Introduction

The XInclude 1.0-based xinclude1() scheme is intended to be used within the XPointer Framework[12] to support the addressing of nodes within XML documents. Pointer parts using the xinclude1() scheme will always fail, as they do not identify portions of an XML document, but they can communicate (though not enforce) expectations for processing of later parts of an XPointer.



 TOC 

2. Justification

While the XInclude 1.0[9] specification clearly identifes the nature of the processing that it describes, it does not prescribe a particular time at which processing should take place. This is very different from XML 1.0[6] parsed entities, where processing explicitly (though optionally) takes place at the time of parsing.

As XInclude is effectively a transformation that adds content to a document from external resources, the result of that transformation may affect the document's structure. That impact will vary with the nature of the XIncluded content, but it may cause various schemes used within the XPointer Framework[12] (including xpointer()[15], element()[14], and xpath1()[16]) to return different answers if XInclude processing happens.

While xinclude1() pointer parts can never provide more than a suggestion, they may be helpful in coordinating program behavior or at least giving a human reader a clue as to why fragment identifiers are behaving differently than expected.



 TOC 

3. Syntax

The scheme name is "xinclude1". The scheme data syntax is as follows; if scheme data in a pointer part with the xinclude1() scheme does not conform to the syntax defined in this section, it is an error and the pointer part fails.

xinclude1() Scheme Syntax:

  ptrpart             ::=    xinclude1( xinclude1schemedata )
  xinclude1schemedata    ::=    yes | no | noFallback

If the xinclude1schemedata has the value of 'yes', it specifies that XInclude processing (complete with fallback) should take place before the evaluation of following parts. If the xinclude1schemedata has the value of 'no', it specifies that XInclude processing should not take place before the evaluation of following parts. If the xinclude1schemedata has the value of 'noFallback', it specifies that XInclude processing should take place before the evaluation of following parts, but no fallback processing should occur.



 TOC 

4. Processing

The XPointer Framework provides limited support for specifying XML processing context. The xmlns()[13] scheme provides support for identifying mappings between prefixes used in pointer parts and namespace URIs, changing the processing context of later pointer parts. By definition, the xmlns() scheme "never identifies a subresource and thus always fails". The xinclude1() scheme relies on a similar mechanism, but because of the XPointer framework's consumption of failures inside an XPointer expression, there is no way for xinclude1() generally to signal an error.

In the event that an XPointer processor provides explicit support for the xinclude1() scheme, it should do its best to provide the context requested by each xinclude1() part. For example, if an XPointer using xinclude1() looked like:

#xinclude1(yes) element(/1/7) xinclude1(noFallback) element(/1/4) xinclude1(no) element(/1/3)

then the processor should first attempt to process the document with XInclude's full facilities, then find the seventh child of the first element in the document. If that didn't return a node, it would do XInclude processing with fallback suppressed, then find the fourth child of the first element in the document. If that didn't return a node, it would examine the document with XInclude completely suppressed, and return the the third child of the first element in the document.



 TOC 

5. Relation to MIME Media Types

MIME Media type registrations should indicate whether or not the xinclude1() scheme is applicable to their contents. While this scheme is obviously most directly connected to XML registrations made in accordance with RFC 3023[5], it could conceivably be used with any registration made in accordance with RFC 2046[1] and RFC 2048[2], provided that the registration provides an explicit mapping between an XInclude-aware XML structure and the contents of the type.



 TOC 

6. XInclude Versions

At the time of writing, the W3C is still developing Version 1.0 of XPath[9]. While there is no clear path beyond version 1.0, this draft has opted to include the version number in the scheme name in the event of substantial future change.



 TOC 

7. Considerations for Streaming Processing

XPointers that include more than one xinclude1() part may require multiple parses of the original document, which may make it incompatible with some streaming processing approaches.



 TOC 

8. Conformance

This specification normatively depends on the XPointer Framework[12], except insofar as it rejects the claim in Section 3.3 that "this specification reserves all scheme names for definition in additional W3C XPointer scheme specifications".

While XPointer processors may simply ignore xinclude1() pointer parts with little damage, those explicitly claiming support for the xinclude1() scheme should support XInclude processing and attempt to supply the context requested by the xinclude1() pointer part.



 TOC 

9. Security Considerations

XInclude processing by its very nature relies on the inclusion of foreign content and its fallback mechanisms provide an opportunity for servers to learn of processing results on clients. To the extent that XInclude itself may be a security risk, use of and support for the xinclude1() scheme may heighten that risk.



 TOC 

10. IANA Considerations

None.



 TOC 

References

[1] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.
[2] Freed, N., Klensin, J. and J. Postel, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", RFC 2048, November 1996.
[3] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.
[4] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, June 1999.
[5] Murata, M., St.Laurent, S. and D. Kohn, "XML Media Types", RFC 3023, January 2001.
[6] Bray, T., Paoli, J. and C. Sperberg-McQueen, "Extensible Markup Language (XML) 1.0", World Wide Web Consortium Recommendation REC-xml, February 1998.
[7] DeRose, S. and J. Clark, "XML Path Language (XPath) Version 1.0", World Wide Web Consortium Recommendation REC-xpath-19991116, November 1999.
[8] Berglund, A., Boag, S., Chamberlin, D., Fernandez, M., Kay, M., Robie, J. and J. Simeon, "XML Path Language (XPath) 2.0", World Wide Web Consortium Working Draft WD-xpath20-20020816, November 1999.
[9] Marsh, J. and D. Orchard, "XML Inclusions (XInclude) Version 1.0", World Wide Web Consortium Candidate Recommendation CR-xinclude-20020221/, September 2002.
[10] Bray, T., Hollander, D. and A. Layman, "Namespaces in XML", World Wide Web Consortium Recommendation REC-xml-names, January 1999.
[11] DeRose, S., Maler, E. and D. Orchard, "XML Linking Language (XLink)", World Wide Web Consortium Recommendation XLink, June 2001.
[12] Grosso, P., Maler, E., Marsh, J. and N. Walsh, "XPointer Framework", World Wide Web Consortium Working Draft XPointer Framework, July 2002.
[13] DeRose, S., Daniel Jr., R. and E. Maler, "XPointer xmlns() Scheme", World Wide Web Consortium Working Draft XPointer xmlns() Scheme, July 2002.
[14] Grosso, P., Maler, E., Marsh, J. and N. Walsh, "XPointer element() Scheme", World Wide Web Consortium Working Draft XPointer element() Scheme, July 2002.
[15] DeRose, S., Daniel Jr., R. and E. Maler, "XPointer xpointer() Scheme", World Wide Web Consortium Working Draft XPointer xpointer() Scheme, July 2002.
[16] St.Laurent, S., "The XPointer xpath1() Scheme", I-D draft-stlaurent-xpath-frag-00.txt, October 2002.


 TOC 

Author's Address

  Simon St.Laurent
  O'Reilly & Associates
  1259 Dryden Road
  Ithaca, New York 14850
  USA
EMail:  simonstl@simonstl.com
URI:  http://www.simonstl.com/


 TOC 

Appendix A. Acknowledgements

Thanks to discussion on xml-dev for inspiration.



 TOC 

Appendix B. Revision History

00 - First version.

[To be deleted before publication.]



 TOC 

Full Copyright Statement

Acknowledgement