[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Generic XML Tag Closer </> (GXTC)
- From: <juanrgonzaleza@canonicalscience.com>
- To: <xml-dev@lists.xml.org>
- Date: Mon, 21 Aug 2006 03:24:59 -0700 (PDT)
Mitch Amiano said:
>
> I'll extend the example in a manner which hopefully illustrates my point
> better, with a bit of well formed HTML gleaned from an old DSSSL-List
> post:
>
> <HTML><BODY STYLE="font-family:helvetica,sans
> sherif;font-size:12pt;background-color:#EEEEEE">
> <DIV STYLE="background-color:teal;color:white;padding:4px"><SPAN
> STYLE="font-weight:bold;color:white">Belgian Waffles</> -
> $5.95</><DIV
> STYLE="margin-left:20px;margin-bottom:1em;font-size:10pt;">two of our
> famous Belgian waffles with plenty of real maple syrup
> <SPAN STYLE="font-style:italic">(650 calories per serving)</></>
> <DIV
> STYLE="background-color:teal;color:white;padding:4px"><SPAN
> STYLE="font-weigh
> t:bold;color:white">Strawberry Belgian Waffles</> - >$7.95 </> <DIV
> STYLE="margin-left:20px;margin-bottom:1em;font-size:10pt;">light Belgian
> waffles covered with strawberries and whipped cream<SPAN
> STYLE="font-style:italic">(900 calories per serving)</></>
> <DIV STYLE="background-color:teal;color:white;padding:4px"><SPAN
> STYLE="font-weight:bold;color:white">Berry-Berry Belgian Waffles</> -
> $8.95</><DIV
> STYLE="margin-left:20px;margin-bottom:1em;font-size:10pt;">light Belgian
> waffles covered with an assortment of fresh berries and whipped
> cream<SPAN STYLE="font-style:italic">(900 calories per serving)</>
> <DIV STYLE="background-color:teal;color:white;padding:4px"><SPAN
> STYLE="font-weight:bold;color:white">French Toast</> - $4.50</>
> <DIV STYLE="margin-left:20px;margin-bottom:1em;font-size:10pt;">thick
> slices made from our homemade sourdough bread<SPAN
> STYLE="font-style:italic">(950 calories per serving)</></></>
> <DIV STYLE="background-color:teal;color:white;padding:4px"><SPAN
> STYLE="font-weight:bold;color:white">Homestyle Breakfast</> -
> $6.95</><DIV
> STYLE="margin-left:20px;margin-bottom:1em;font-size:10pt;">two eggs,
> bacon or sausage, toast, and our ever-popular hash browns</></></>
>
> Now if I cut-and-paste wrong, which <DIV> or <SPAN> was supposed to be
> terminated?
> I can figure it out... the sample is small... but as it grows in
> complexity and size I'd rather not have to guess.
>
Yes, in that case the end tag is helpful.
Three points: i) XML requires the end tag but other approaches leave it
optional, therefore, in ConciseXML you can write the full </SPAN> and
</DIV> ii) When codes are ordered and indented, you can easily match end
start tags even </> iii) Special XML editors to assistance in editing of
XML docs can be used for matching XML fragments. I do not know if there
exists special editors for ConciseXML.
>>
>> Many people do not find greater readability with the XML format.
>> Other, of course, disagree. Morever, the supposed readability of end
>> tags often disappears when using attributes since end tags can match
>> any start tag independently of attributes:
>>
>> <section class="normal">
>> <section class="special">
>> ...
>> </section>
>> </section>
>>
>> What section closes the final tag? first? second? other contain in
>> ...?
>>
>>
> You're right, it is arguable, and probably not worth expending much
> energy on.
> I certainly wouldn't always argue that an XML format is the end-all and
> be-all of formats... I prefer writing RelaxNG's compact format to the
> XML syntax.
>
> In this case, at least I only have to scan for <sections>, not every
> single element type in the document.
All depend of the structure of the doc. If the doc is full of section
elements, then scan for <sections> only does not help much.
> If it isn't well-formed, I'm going to have to weed out the
> inconsistency, but the existence of the two </section> end tags at least
> tells me that it isn't the number of <section> end tags that is the
> problem. Especially where the element structures and namespaces get more
> varied, I think I'd prefer not to do without that feature.
Note i said:
>> What section closes the final tag? first? second? other contain in
>> ...?
Take a 1000 elements doc. You cannot know if exists a third section tag in
the "..."
About inconsistency. We are asuming absence of end tag. I remember my
writting a MathML XML doc by hand (not being masoschistic that day but
because needing advanced features not supported by current tools: fine
parallel markup with OM extensions) and i did mistake of writting <mi>
instead </mi>. Browser parser pointed to wrong localization when
validating. I did need some time before find the error in a non-automated
scan, then i was masochistic ;-)
>
> Regards
> - Mitch
>
Juan R.
Center for CANONICAL |SCIENCE)
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]