Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Generic XML Tag Closer (GXTC)

From: <juanrgonzaleza@----------------.--->
To: <xml-dev@-----.---.--->
Date: 8/25/2006 10:52:00 AM
Rick Marshall said:
> my 5c
>
> </> is a syntax element and as long as something else understands the
> semantics - it will do fine
>
> however...
>
> </tag> is semantic which means the parser/processor does not need
> external information to make a descision about the correctness and
> completeness of the information.

<tag1>content1<tag2>content2</tag2></tag1>

Once parsed <tag1> and <tag2> the parser finds the "</" and *wait* a
"tag2" because consistency of the XML. The same when finds the </tag1>.

<tag1>content1<tag2>content2</></>

Once parsed <tag1> and <tag2> the parser finds the "</" and knows/assumes
is closing the open tag2 because consistency of XML. The same when finds
the last </>.

No external information is needed. Differences:

- With </tag-name> the closing is pre-defined in the doc. With </> it is
*not* predefined, in the sense that the tag always closes the latter empty
tag.

- Therefore, we return to begin of this thread. In certain dinamical docs
the value of the end tag cannot be known _a priori_ and </tag-name> is of
no utility here. Therefore the need for the option </>.

- Sometimes the end tag of XML can be of help when parsing erroneous docs.

Therefore sometimes </end-tag> can be better than </>; sometimes </> can
be better than </end-tag>.

> For those who remember the programming language discussions of 20+ years
>  ago (and today?) this issue must have a strong feeling of deja vu.
>
> eg
>
> function X {.....} /* end of X */

Today also! In fact there is still debate specially between people
developing new PLs on what is better option LISP/C syntaxes or Pascal
like.

The inmmense popularity of C syntax

function X {.....}

or LISP one

(function X .....)

over Pascal like blocks

begin function X ..... end function

offers an idea on why </> is being promoted for PL applications.

Your explicit quoting of comments at end of function is very interesting
because it is the common reply to the human readability of XML end tags
becoming from LISP/Scheme community. I also agree that something like

[::section
..."300 pages of code here"...
#end section of line 24]

is more readable than

<section>
..."300 pages of code here"...
</section>

About verbosity, this

<temperature>300</>

is less verbose than

<temperature>300</temperature>

in a large factor. Imagine a large sample from laboratory

> ;)
>
> rick
>

P.S. CSS does not use end tags H2 {...}


Juan R.

Center for CANONICAL |SCIENCE)


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent