- From: Dennis E. Hamilton <dennis.hamilton@acm.org>
- Date: Fri, 15 Mar 2013 16:23:53 -0700
- To: <public-change@w3.org>
After struggling over this with others for years, the conversation about XPath and the contribution from Claudius about ExPath inspired the following formulation. This is very high level. It may accomplish more than what the Change Tracking Markup Community is after. It helps me deal with some specific compound-document use cases. This formulation satisfies some but not all requirements at <http://www.w3.org/community/change/wiki/index.php?title=Requirements&oldid=2>. I'm hesitant, at this point, to assess how close/far this is with respect to the various OpenDocument change-tracking specifications and the proposed replacements. 1. Metaphor 2. Notational Capabilities 3. Fundamentals 4. Relationship to XML 5. Open Items for Deeper Levels of Detail Despite my attempt to make this part of a rigorous development, this is still very much rough draft and only at a pretty abstract level. 1. METAPHOR (homage to Kent Beck) 1.1 Savage in that it may be a Scalpel, Scissors, Saw, Sword, Sledgehammer, Spontoon, and Splitter 1.2 Savage with regard to Slices, Scars, Seams, Splits, Splices, Sutures, and Solder 1.3 SCT for short 2. NOTATIONAL CAPABILITIES 2.1 There is a notation for identifying a point (in the manner of XPath) including pointing to a position in the body of a text, attribute-value, or comment node (termed text point). 2.2 There is a notation for specifying a cursor at a node or before a text point. 2.2.1 with a well-established context, there may be a way for this position to be relative to that of some existing logical cursor. 2.3 There is a notation for specifying a cursor at a subsequent point in the XML progression at a node or before a text point. 2.3.1 This can be omitted when the first and subsequent cursor are at the same place 2.3.2 There should be a way for this version to be relative to the first 2.4 The reference model for this notation is based on an Augmented XPath/XPointer definition 2.4.1 The notation works when carried in elements internal to the XML Document in which change- tracking is carried 2.4.2 The notation works when carried in an external document that consolidates change-tracking applied to one or more XML documents (e.g., in a compound/multi-part document packaging consisting of multiple XML documents). 3. FUNDAMENTALS 3.1 Changes can be expressed against before-looks or after-looks 3.1.1 A before-look document is one to which subsequent changes (+deltas) are applied to implement subsequent changes. This is SCT+ mode. In general, there is nothing in the before-look that reflects the existence of any +deltas. The before-look can be digitally signed and treated as immutable. 3.1.2 An after-look document is one to which previous changes (-deltas) can be applied to revert to earlier forms. This is SCT- mode. 3.1.3 A mid-look is a basis for SCT+ that is itself a change-tracked document, but all changes are to the after-look (derived, if necessary) of that document. 3.1.4 Every SCT+ form is faithfully convertible to a complementary SCT- form, and vice versa. 3.2 The model is extensional (that is, entirely lexical and only moderately notional). There is no consideration of semantics with respect to the application of the XML document. 3.2.1 Processing of tracked changes can be carried out without knowledge of any applicable schema and any conditions on an XML document instance's interpretation as a carrier of an (abstract) document representation. 3.2.2 Any semantic constraints on the SCT that is produced for an application of the XML document is by agreement among producers and consumers. There shall be a means to explicitly identify and refer to profiles representing such agreements. They do not alter the rules for interpretation of SCT that was produced in conformance to such constraints. The profiles themselves are beyond the scope of SCT. (There may be use cases around the nature of profiles that are facilitated by SCT as part of the rationale for SCT.) 3.2.3 Validity under change is defined to mean that application of each single change, in appropriate (non-conflicting) sequence, transforms an application-valid document to an equivalently-application-valid document. SCT validity is determined by agreement between producers and consumers and is asserted with the identification of a profile. 3.3 Individual (atomic) changes consist of operations that apply against a specified span from one cursor position in the XML document under consideration to a subsequent cursor position of that document. 3.3.1 The span need not respect the hierarchy of XML elements. The span is always contiguous and forward from the initial cursor position to the ending cursor position. 3.3.2 The "document under consideration" is the mid-look of the document just before a given SCT+ change was applied and just after a given SCT- change was applied. 3.3.3 An individual change is not severable. It shall be accepted, rejected, and carried in history as a unit. 3.4 Singleton (molecular) changes consist of one or more individual changes that are treated as necessarily simultaneous in the manner of an individual. 3.4.2 If the spans of individual changes in a singleton overlap in any manner, ambiguity is resolved by explicit ordering of the individual changes. 3.4.1 For changes involving contiguous/nesting spans in an XML document, there can be convertibility between singleton and individual changes. There is no constraint on how such cases are addressed. Either form may occur in the tracking of changes for a given document. 3.5 Any severing of element content and splicing across the scars can require any of end-tag change, start-tag introduction, and introduction of new elements. Although SCT provides sufficient information for correct application/reconstruction without knowledge of the application, such dramatic changes, where allowed, require a profile for determining what are the valid, semantics-preserving transformations. 4. RELATIONSHIP TO XML 4.1 SCT information necessary for representing and associating tracked changes on an XML document (set) is completely representable in XML. 4.2 Existing XML specifications are employed wherever possible, with any necessary profiling and augmentation (e.g., for XSLT, XPath, XLink, and XPointer). 4.3 XML elements and attributes defined for SCT- can be introduced as extended occurrences in conjunction with existing XML formats (schemas and DTDs). [Note: SCT+ necessarily does not touch a document under its existing schema or DTD. The after-look can likewise be devoid of any SCT evidence.] 5. OPEN ITEMS FOR DEEPER LEVELS OF DETAIL positioning in Processing Instructions Treatment of character references and other internal entity references (e.g, < and such) in text-node and attribute-node values (at least). indexing scheme for text points (at a character or before a character, 1-origin or 0-origin) Spans that start or end in attributes (and what the ordering in a start tag is presumed to be - a canonicalization issue perhaps) Clipboard actions and their relationship to SCT expression (though out-of-band to SCT) Copy/Cut and multiple-paste, move rather than replace Collateral effects (changes to tables of content, paginations, indexes, and other interdependencies of changes at the markup and content level) (though also out-of-band to SCT) Change tracking a DOCTYPE declaration (?) [hmm, probably not reachable by XPATH?] PS: I forgot to clean up the subject heading of the post below. That is not a misrouted [OFF-LIST] [;<). -----Original Message----- From: Dennis E. Hamilton [mailto:dennis.hamilton@acm.org] Sent: Friday, March 15, 2013 10:41 To: public-change@w3.org Cc: 'Claudius Teodorescu' Subject: RE: [OFF-LIST] RE: XPath to identify a point in an XML document (Was: A sort of synthesis) Claudius asked me an interesting question in an off-list note today. With his permission I am reporting his question and my response to the list. Also, since this happened, a big coin dropped on my head. I think I have a way to express a model that has eluded me for at least four years. I will report on that separately. [ ... ]
Received on Friday, 15 March 2013 23:24:22 UTC