OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Fieldmarks: Nesting?


Hi Patrick,

I try to keep my answer as simple as possible: I want the same functionality as bookmarks [since thats what developers
currently abusing. So fieldmarks are bookmarks with some syntactic sugar:
a) Fieldmarks do not only have a name, but instead a name and (propName, propValue) pairs. This allows developers
    to get rid of the string encoding they are currently using. E.g. in OOXML you have to use "fieldmark /param1 value1
/param2 value2, etc...".
b) With bookmarks you can [in theory] do things like
    <p>...<bookmark-start name="A"/>...</p>
    <p>... <bookmark-start name="B"/>...</p>
    <p>...<bookmark-end name="A"/>...</p>
    <p>...<bookmark-end name="B"/>...</p>
    thats disallowed in fieldmarks since you can only say
    <p>...<fieldmark-start name="A"/>...</p>
    <p>... <fieldmark-start name="B"/>...</p>
    <p>...<fieldmark-end/>...</p>
    <p>...<fieldmark-end/>...</p>
    which would transform into
    <p>...<bookmark-start name="A"/>...</p>
    <p>... <bookmark-start name="B"/>...</p>
    <p>...<bookmark-end name="B"/>...</p>
    <p>...<bookmark-end name="A"/>...</p>
    so getting not allowing a name attribute at the field-mark end always causes fieldmarks to be properly nested.
    This has nothing to do with XML well-formedness.
c) <fieldmark>...</fieldmark> is an abbreviation for <fieldmark-start/>...<fieldmark-end/> which can (SHOULD) be 
   used when the fieldmark start end end is not spanning paragraphs and thus XML wellformedness can be achieved.

~Florian


>>> Patrick Durusau <patrick@durusau.net> 05/06/08 5:47 PM >>>
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 we
ll-formedness is *not* a goal for 
fieldmarks.

Here is wha1) 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)




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]