Review of XML Fragment Interchange Candidate Recommendation

Dear XML Fragments Working Group,

find attached my review of your CR on behalf of the W3C XML Query working
group.

Regards,
	Ingo Macherius

---snip--
Review of
XML Fragment Interchange
W3C Candidate Recommendation 12 February 2001

(1) Summary
-----------

The "XML Fragment Interchange" CR [1] proposes a mechanism for
access to parts of valid or well-formed XML 1.0 documents without
the need to exchange the complete document. The proposed
mechanism works at the textual XML level and covers full XML 1.0
syntax, including advanced features such as DTD, Entities and
Notations. The minimum granularity of a fragment is an element,
i.e., fragments cannot be text-nodes, attribute-nodes or values.

The CR defines:
(a) Fragment Context Information Set (FCI): The minimal
information required by a validating parser to move into exactly
the same state it would have reached by parsing the full XML 1.0
document the fragment was exported from.
(b) Fragment specification information (FCS): a concrete XML
markup to serialize this information.
(c) Document partitioning: Partitioning of the original document
and its internal and external DTD into URL-addressable entities
suitable for transmission or reference.

(2) Relation to other W3C activities
------------------------------------

In non-normative parts of the CR, the following is discussed for
inclusion in future versions:

(a) Packaging of fragment-related entities into transport units
using XML or MIME containers
(b) Negotiation of a subset of the FCI information required for a
concrete application of fragments
(c) Deployment of XML Schema
(d) The use of XPointers to locate fragments "in sito" of
original documents

Obviously (a) and (b) is also in the domain of "XML Protocol",
(c) in "XML Schema" and (d) in "XML Query" and "XPath 2.0".

Finally, XML fragments are similar to a subset of XLink. However,
it has the narrower scope of machine-to-machine scenarios.
Given this, XLink syntax compatibility is an achievable and
worthwhile goal for future versions. Still independence from
XLink is desirable because it allows for streamlined
implementations of fragment-only processors.

(3) Detailed Comments on Issues relevant to Query
-------------------------------------------------

- Optional parts

The CR has many optional parts (7 issues). As there is no
implementation yet [2], this raises interoperability questions.
Future versions could fix a set of fully specified usage
profiles.

- Granularity

The CR tackles the problem of fragment interchange at the syntax
level rather than on the data model level. It's well-balancedness
constraint limits exchange granularity to the element level (plus
comments and PIs). Finer grained data such as typed or untyped
values and attributes cannot easily be handled.

- Physical constructs

The CR explicitly allows for physical level constructs such as
character references and entities. For the good and the bad,
physical XML 1.0 constructs leave much freedom to applications of
XML fragment. This feature is not required by the Query Data
Model and may be restricted for simplicity and interoperability.

- Dependency on DTD

The goal to be fully compliant with XML 1.0 DTDs introduces the
remarkable construct of a "externalized copies of the internal
DTD subset". The Query WG supports the editors future goal to
replace this with XML Schema support.

Providing the necessary context for the resulting XML fragments
should be done using XML schema and namespaces. It should
not be required to be a well-formed XML document, ie may have
multiple top-level elements.

- Formalization by using Infoset and XPath

Technically speaking, the CR defines the FCI by (1) extending XML
1.0's BNF productions and (2) prose, which resembles XPath axes
semantics. This could be formalized using the XML Infoset and
unabbreviated XPath expressions.

In particular the CR should make an explicit statement on the
equivalence of the Information Set derived by parsing either the
fragment or the respective in-sito part of the original document.

- Read-Only / Updates / OID

While the CR introduces the use case "editing", it does not
specify update mechanisms. While the CR does not preclude
updates, it is not clear how the fragment relates to the original
document with regard to modifications of either.


(4) Conclusions
---------------

For XML-Query, XML Fragments MAY be an appropriate mechanism to
return and serialize results of "object preserving queries",
i.e., all those queries that do not involve element-construction.
However, to this end, "XML Fragment Interchange" needs to become
XML Schema-and XML Protocol aware.


[1] http://www.w3.org/TR/2001/CR-xml-fragment-20010212
[2] http://lists.xml.org/archives/xml-dev/200102/msg00264.html

Received on Tuesday, 22 May 2001 10:17:19 UTC