I just bumped into an XML parsing problem that may weight your decision.
I am working with groovy and using their XmlSlurper. This class uses a
dynamic language approach to parse XMl so
<a><b c="fred"/></a>
can be parsed with
new XmlSlurper(xml).a.b.@c
Since a tag like a-b would not represent a valid language syntax it
would not be able to dynamically resolve the tag name. My nasty
example is "session.ejb-name". Yet another reason to hate EJBs.
So, not sure if Groovy or JRuby is in your future but depending on how
long your XML standard survives this might be important. Don't forget
the admin tools you might build in a secondary language that could be
helped with simple access to an xml file.
For example, I am using the Groovy Monkey Eclipse plugin which allows
me to extend Eclipse with groovy script. You create a fred.gm file and
it appears in the Monkey menu. I am finding it very conventient to
augment my tasks with little scripts that I can write on the fly. My
current task is to validate the class names in the ejb-jar.xml file to
catch typos before a long deploy step.
On 11/28/06, Eric Bardes <ericbardes@xxxxxxxxx> wrote:
I've observed that it varies based upon industries.
<thisthat> is the one in place at my current location and they have a team
devoted to designing DTD's for XML transfer among systems. <copyrightinfo>
and <itemname> and <itemnumber> are generic examples from the DTD.
The National Institue of Health has some public DTD's with elements named
<article-commentary>. See
http://dtd.nlm.nih.gov/publishing/2.2/journalpublishing.dtd
for theirs. This appears to hold for much of the medical DTD's I've seen.
In the legal world, they seem to prefer CamelCase
<!ELEMENT Case
(CaseNumber?,CaseCaption,Parties*,JudicialOfficers?) >
<!ELEMENT Court
(CourtName,CourtType?,CourtJurisdiction?,CourtCountry?,Address?)
>
<!ELEMENT Stipulations (#PCDATA) >
<!ELEMENT SessionInfo
(SessionDate?,DateContinuedFrom?,StartTime?,EndTime?,
DayOfProceedings?,Address?,CourtRoom?,Appearances?,Reporters?,Volume?,
Exhibit+) >
On 11/28/06, twcrone@xxxxxxxxxxxxx <twcrone@xxxxxxxxxxxxx> wrote:
> Is <this-that> a more "standard" XML tag than <thisThat>, <ThisThat> or
<THIS_THAT>?
>
> Using the "lowercase dash" format seems pretty standard in XML
configuration files but I am not sure if that is considered the "best" way
to do tags for data exchange files.
>
> Thanks,
>
> - Todd
>
--
Cheers,
Eric Bardes
--
Ed
|