users
[Top] [All Lists]

Re: [cinjug-users] Standard XML tags

To: users@xxxxxxxxxx
Subject: Re: [cinjug-users] Standard XML tags
From: "Edward Sumerfield" <esumerfd@xxxxxxxxxxxxxx>
Date: Wed, 29 Nov 2006 18:27:22 -0500
Delivered-to: mailing list users@cinjug.org
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=QeeR6tuhAgdHYTrm0nm1cLzkQDaXpYF79AdYxUEwh1l93yCXwrghpyZRSOGsXGCu2rPaddzIe2g2h9GxfUjNNNse15xN3Zhh0c6Vq0T9jb5NwANeAXrrK+MTn3xeALz1rjdpwsw6cjyLhmyikoI0yG1KC4qi9fNttHwj8o3nEgg=
In-reply-to: <953572d70611280645y4d8593e4l811660b573fb0317@mail.gmail.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
References: <f611eac026559.456bfe4b@insightbb.com> <953572d70611280645y4d8593e4l811660b573fb0317@mail.gmail.com>
Reply-to: esumerfd@xxxxxxxxxxxxxx
Sender: esumerfd@xxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>