Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XML naming conventions and good practice [Thread Next] Re: XML naming conventions and good practiceTo: NULL Date: 5/18/2009 11:49:00 PM pdpi wrote:
> On May 17, 10:17 pm, r...@zedat.fu-berlin.de (Stefan Ram) wrote:
>> Is it so verbose?
>>
>> The major redundancy I see is the end tag.
>>
>> But that's about it.
>>
>> On might say that a Java call
>>
>> item("xyz789",3,29.99,1234567890)
>>
>> is shorter to denotate the item, but this is only possible if
>> there are not many more possible attributes (which are omitted
>> above). Otherwise one needs a means to indicate which
>> attributes are given and which are omitted. But the XML call
>> with the attribute names is more readable.
>>
>> When one tries to come up with something that is better than XML,
>> one sees that this is not that easy.
>> One might be able to do some fine tuning here and there.
>>
>> Verbosity is not annoying as long as one gains something by it.
>> When one gains readability or robustness, it can be accepted.
>
> Trying to come up with a way to nest tags without proper tag closing
> is a nightmare, so I can hardly consider closing tags redundant.
This was why SGML allowed you to declare them optional, where
syntactically possible. Here is an example HTML document:
<!doctype html system "html2.dtd" [
<!entity % html.recommended 'ignore'>
]>
<title>Demo</title>
<p>Hello, world!
This is completely valid, which you can test by normalizing it, eg:
$ sgmlnorm /usr/local/lib/sgml/sgmlhtml.dec demo.html
<HTML>
<HEAD>
<TITLE>Demo</TITLE>
</HEAD>
<BODY>
<P>Hello, world!</P>
</BODY>
</HTML>
All the markup that was implied by being declared omissible in the DTD
can correctly be inferred by a validating parser. There were other
options to make the markup even terser, to the point of human-unreadability.
Unsurprisingly, this was one of the first things to go in XML :-)
///Peter
--
XML FAQ: http://xml.silmaril.ie/
Followup to a.e.u removed.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
