Re: [AD] Re: [AL] allegro DTD

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


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




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/