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

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


One could also use underscores, in the same style as Allegro itself... 

-----Original Message-----
From: alleg-developers-admin@xxxxxxxxxx
[mailto:alleg-developers-admin@xxxxxxxxxx] On Behalf Of
Matthew Leverton
Sent: Thursday, December 02, 2004 8:15 PM
To: alleg-developers@xxxxxxxxxx
Subject: Re: [AD] Re: [AL] allegro DTD

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
-- 
https://lists.sourceforge.net/lists/listinfo/alleg-developers




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