Re: FCS and large documents

Micah,

Thank you for your input on the XML Fragment Interchange WD.

Your suggested addition at first seems quite reasonable, 
especially given your example.  Upon reflection, however, 
the Working Group had several concerns.

The main concern is that the fcs is currently *just* a subset 
of the actual existing document; the only objects in the
special "fragment" namespace are the fcs element wrapper around
the entire thing and the empty fragbody element that marks the
place of the fragment body; everything thing else comes
straight from the parent document.  It wouldn't even really
take a fully namespace aware application to process this, it 
could just handle the fcs and fragbody elements specially.  

Adding a namespaced attribute on potentially any element coming from 
the parent document adds a level of complexity that the WG didn't
want to add at this late stage.  Furthermore, this addition is not
needed for parsing info (unless you have a very strange DTD where
the context is really different for the 101st chapter than for the
first 100, for example), it's only useful for locating the original
element in the parent document, and that can be done more efficiently
via the sourcelocn attribute of the fcs element.

Therefore, the WG's response to your comment is that, while it is an 
interesting extension that might be considered for a future version, 
we won't implement this in our 1.0 specification, and we suggest the 
use of the sourcelocn attribute as a possible workaround for those
trying to accomplish what your example demonstrates.

Paul Grosso, Chair XML Fragment WG 

>From: Micah Dubinko <MDubinko@cardiff.com>
>To: www-xml-fragment-comments@w3.org
>Date: Thu, 22 Apr 1999 16:57:43 -0700
>Subject: FCS and large documents
>
>Could the currently defined FCS be made more convenient for large documents?
>
>A long example - From Jon Bosak's Old Testament markup, Psalm 119:176:
>
><f:fcs xmlns:f="http://www.w3.org/XML/Fragment/1.0" ...>
><!-- this is a simplified model, intended to make a point. Some elements
>have been omitted -->
><tstmt>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>  <book>
>    <chapter>
>    <chapter>
>    <chapter>
>    ... > 100 chapters omitted ...
>    <chapter>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>      <div>
>        <v>
>        <v>
>        <v>
>        <v>
>        <v>
>        <v>
>        <v>
>          <f:fragbody/>
>        </v>
>        </v>
>        </v>
>        </v>
>        </v>
>        </v>
>        </v>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>      </div>
>    </chapter>
>    ... >100 /chapters omitted
>    </chapter>
>    </chapter>
>    </chapter>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
>  </book>
></tstmt>
></f:fcs>
>
>Compared to all that, the fragment body would be:
><v>I have gone astray like a lost sheep; seek thy servant; for I do not
>forget thy commandments.</v>
>
>It seems to me that, for DTD-based, or even Schema-based XML, long runs of
>identical sibling elements can typically occur.
>
>Therefore I propose a "repeat" attribute to be added to the Fragment
>Interchange Namespace. The above example would then look like this:
>
><f:fcs xmlns:f="http://www.w3.org/XML/Fragment/1.0" ...>
><tstmt>
>  <book f:repeat="19">
>    <chapter f:repeat="119">
>      <div f:repeat="22">
>        <v f:repeat="7">
>          <f:fragbody/>
>        </v>
>      </div>
>    </chapter>
>  </book>
></tstmt>
></f:fcs>
>
>Admittedly, not every document will benefit as much as this somewhat
>contrived example -- for instance, documents that don't have long runs of
>identical elements, or differing attributes on otherwise identical elements.
>Still, I believe that this could be seen as a welcome change for people that
>will deal with fragments of large documents.
>
>The implementation impact of this change should be minimal, and might even
>reduce the memory requirements of an implementation.
>
>Thanks,
>
>.micah
>
>
>

Received on Monday, 10 May 1999 15:57:38 UTC