Re: [AD] Re: [AL] allegro DTD |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] Re: [AL] allegro DTD
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Thu, 2 Dec 2004 22:15:10 -0600
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=lmIEDPrv93R127yh8EmLP7fMeCUU0ROqgl/MjTFpmLx6DPQnxJR1QteRmvfLaI7FNwqe4/crrs5vT2WTCumuriLGOR91EziRFlpTSl2UtwgkUxWVE7+9dy1E4Aa/hNNqnGFV6jd5jcpoRm+vSbEunddZxPNkN5AbKb16PVjTEOA=
I'm just catching up on the mailing list, and missed this thread. So
forgive my ignorance....
> Oh, btw, what do others think about using ".alx" (pronounced alex :)
> instead of "._tx" for the new ._tx format? It would be easier to
> pronounce, and there would be no confusion with the old format.
>
Is the new format going to be the XML file? If so, it should just be .xml...
Anyway, what I wanted to propose is this... Remove all the dashes from
the tag names. I've never seen an XML document make such liberal use
of dashes. (In fact, this is the only XML doc I've seen with any
dashes in tag names.) They are generally a nuisance for parsing.
For example, in PHP, one can do this to loop through the XML file:
foreach ($doc->chapter as $chapter)
{
print '<h2>'.$chapter->title.'</h2>';
foreach ($chapter->section as $section)
{
print '<h3>'.$section->title.'</h3>';
// process api-section
}
}
Now, when one tries to do something like $section->api-section, the -
obviously gets parsed as a minus sign, and bad things happen. Yes, PHP
has work-arounds (ie, using the more unfriendly DOM objects or xPath),
but other languages may not.
I propose to use more conventional names, as opposed to trying to make
the file look pretty.
examples:
api-section => api
cross-ref => xref
(I'm not sure why we aren't using DocBook to begin with...)
Anyway, I'm all for getting rid of the ._tx format. It was a pain
parsing through it to enter it in my DB.
--
Matthew Leverton