OASIS Open Document Format for Office Applications (OpenDocument) TC

  • 1.  Re: Fieldmarks: Nesting?

    Posted 05-06-2008 14:50
    Hi Patrick,
    
    I guess there is a misunderstanding:
    
    So we have fieldmark-start and fielmark-end similar to bookmark-start and bookmark-end. Only difference is that
    fieldmark-end do not have a name and thus they are always properly nested.
    
    The fieldmark [without-start/end] is just an abbreviation. E.g. both representations are equivalent:
    


  • 2.  Re: Fieldmarks: Nesting?

    Posted 05-06-2008 15:48
    Florian,
    
    Yes, there is misunderstanding and I am afraid it continues in this post:
    
    Florian Reuter wrote:
    > Hi Patrick,
    >
    > I guess there is a misunderstanding:
    >
    > So we have fieldmark-start and fielmark-end similar to bookmark-start and bookmark-end. Only difference is that
    > fieldmark-end do not have a name and thus they are always properly nested.
    >
    >   
    Err, having names or not isn't a condition for proper nesting.
    
    I think you mean being "well-formed" on which the XML standard says:
    
    > [Definition: There is exactly one element, called the *root*, or 
    > document element, no part of which appears in the content 
    > 


  • 3.  Re: [office] Re: Fieldmarks: Nesting?

    Posted 05-06-2008 17:25

    I guess my question is this -- what is the usual case in real documents?  Normal testing behavior?  Or overlapping?  What do users typically do?  We should optimize for the typical case, but at the same time be expressive enough to handle all cases.

    It seems to me that the following are the only ways in which two elements, a and b, can relate:

    a precedes b:   <a>foo></a><b>bar</b>

    a follows b: <b>foo></b><a>bar</a>

    a includes b:  <a><b>foo bar</b></a>

    b includes a:  <b><a>foo bar</a></b>

    a  and b overlap (not allowed in XML): <a>fo<b>o </a>bar<b/>

    (We should ignore OOXML's strange use in VML of:  <a b="base64encoded version of element b content"/>

    The overlap case can be expressed at least two ways:

    The way trick that Florian indicates:  <a>fo<b-start/>o </a>bar<b-end/>

    or with a merge convention:  <a>fo</a><a merge="true"><b>o bar</b></a>

    Just a thought.  But if we think most cases are going to following normal nesting rules (which is an open question), then why not just use normal element nesting syntax and handle the exception cases with a merge flag?

    -Rob

    Patrick Durusau <patrick@durusau.net> wrote on 05/06/2008 11:47:31 AM:

    > Florian,
    >
    > Yes, there is misunderstanding and I am afraid it continues in this post:
    >
    > Florian Reuter wrote:
    > > Hi Patrick,
    > >
    > > I guess there is a misunderstanding:
    > >
    > > So we have fieldmark-start and fielmark-end similar to bookmark-
    > start and bookmark-end. Only difference is that
    > > fieldmark-end do not have a name and thus they are always properly nested.
    > >
    > >  
    > Err, having names or not isn't a condition for proper nesting.
    >
    > I think you mean being "well-formed" on which the XML standard says:
    >
    > > [Definition: There is exactly one element, called the *root*, or
    > > document element, no part of which appears in the content
    > > <
    http://www.w3.org/TR/2006/REC-xml-20060816/#dt-content> of any other
    > > element.] For all other elements, if the start-tag
    > > <
    http://www.w3.org/TR/2006/REC-xml-20060816/#dt-stag> is in the
    > > content of another element, the end-tag
    > > <
    http://www.w3.org/TR/2006/REC-xml-20060816/#dt-etag> is in the
    > > content of the same element. More simply stated, the elements,
    > > delimited by start- and end-tags, nest properly within each other.
    > If that is what you mean by "nesting" then yes, we are on the same page
    > thus far.
    >
    > > The fieldmark [without-start/end] is just an abbreviation. E.g.
    > both representations are equivalent:
    > > <fieldmark-start/>Hello World<fieldmark-end/>    [That we way you
    > would do it with bookmarks]
    > > <fieldmark>Hello World</fieldmark>
    > > Since the second form is much more convenient for XML processors I
    > thought it was a good idea to say that this form
    > > SHOULD be preferably written.
    > >
    > >  
    > Ok, but that isn't what you wrote or at least not how I read it. I read
    > it to say you preferred the empty element form.
    >
    > I wouldn't say that the second form is more "covenient," it really
    > depends on what you want to do.
    >
    > If you merely want to mark a location in a text, probably using the
    > empty element is as good as any approach.
    >
    > BTW, simply becaue an element has names linking the start and end
    > element doesn't mean that it can't be well-formed. It would be odd to go
    > to that much trouble if you were going to be well-formed but it
    > certainly is possible.
    > > However if you are doing a field marking like
    > > <p>The following <fieldmark-start/>text is a fieldmark</p>
    > > <p>spanning two paragraphs<fieldmark-end/>.</p>
    > > There is no way using the second form.
    > >
    > > Make sense?
    > >
    > >  
    > OK, so you are now saying that well-formedness is *not* a goal for
    > fieldmarks.
    >
    > Here is what I am hearing (warning: may not be what you mean):
    >
    > 1) fieldmark element must be able to contain content
    >
    > 2) that content may be in different elements so like bookmark, fieldmark
    > must not be required to be well-formed
    >
    > 3) but, in some cases fieldmark can be well-formed.
    >
    > It is the gap, which may entirely be me, between 2 and 3 that is
    > confusing me.
    >
    > If fieldmark is *always* well-formed, that is one case. If not, it is
    > another. But, we have to clearly understand which of those two are at issue.
    >
    > Hope you are having a great day!
    >
    > Patrick
    > > ~Florian
    > >
    > > P.S:
    > > Maybe its a good idea to add this abbreviated form for bookmarks
    > too... Current the <bookmark> element only marks one
    > > position and not a span. So there is no alternative to writen
    > bookmark-start and bookmark-end.
    > >
    > >  
    > >>>> Patrick Durusau <patrick@durusau.net> 05/06/08 4:27 PM >>>
    > >>>>        
    > > Florian,
    > >
    > > A couple of questions before commenting on the fieldmark proposal:
    > >
    > >  
    > >> Fieldmarks are very similar to bookmarks, except that they need to be
    > >> properly nested. This is achieved by the fact, that a
    > >> field:fieldmark-end does not have a “name” attribute, but instead
    > >> closes the last opened field:fieldmark-start element. The
    > >> field:fieldmark element is short form of field:fieldmark-start and
    > >> field:fieldmark-end. It SHOULD preferably be written instead of
    > >> start-/end marks.
    > >>    
    > > OK, on one hand you say that Fieldmarks should be properly nested and
    > > use the rule that is typical of XML, the first end element closes the
    > > nearest open element.
    > >
    > > But, then you say it should be written as an empty element, <fieldmark
    > > (lots of fieldmark attributes) /> instead of start/end marks.
    > >
    > > If the empty element form works, then nesting is not a requirement. Yes?
    > >
    > > If nesting is a requirement, is the requirement that one fieldmark has a
    > > relationship to another?
    > >
    > > If so, nesting is only one way to represent such a relationship and
    > > probably not the best one because the relationship is only implied.
    > >
    > > If you want to take action based on some relationship it is probably
    > > best to have it explicit. That allows you to have multiple relationships
    > > and not just whatever containment may imply.
    > >
    > > Hope you are having a great day!
    > >
    > > Patrick
    > >
    > >  
    >
    > --
    > Patrick Durusau
    > patrick@durusau.net
    > Chair, V1 - US TAG to JTC 1/SC 34
    > Convener, JTC 1/SC 34/WG 3 (Topic Maps)
    > Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300
    > Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe from this mail list, you must leave the OASIS TC that
    > generates this mail.  You may a link to this group and all your TCs in OASIS
    > at:
    >
    https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
    >


  • 4.  Re: [office] Re: Fieldmarks: Nesting?

    Posted 05-06-2008 17:47
    Rob,
    
    robert_weir@us.ibm.com wrote:
    >
    > I guess my question is this -- what is the usual case in real 
    > documents? Normal testing behavior? Or overlapping? What do users 
    > typically do? We should optimize for the typical case, but at the same 
    > time be expressive enough to handle all cases.
    >
    > It seems to me that the following are the only ways in which two 
    > elements, a and b, can relate:
    >
    > a precedes b: foo>bar
    >
    > a follows b: foo>bar
    >
    > a includes b: foo bar
    >
    > b includes a: foo bar
    >
    > a and b overlap (not allowed in XML): foo bar
    >
    > (We should ignore OOXML's strange use in VML of: 
    >
    Err, actually the overlap case is more complicated that it appears at 
    first blush.
    
    There are some 13 cases of overlap, see: 
    http://www.durusau.net/publications/Concurrent_markup.pdf
    > The overlap case can be expressed at least two ways:
    >
    > The way trick that Florian indicates: fobar