Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > type-specific elements vs type attribute

Reply
Thread Tools

type-specific elements vs type attribute

 
 
Brunswick
Guest
Posts: n/a
 
      01-26-2004
I am in the process of defining a protocol that my company will use to
communicate with its customers. At the moment I'm scratching my head
about one issue. Should I use type-specific elements to describe our
entities
e.g.
<blah>
<floorp>sloop</floorp>
<gloorp>droop</gloorp>
</blah>

or have a generic element with a type attribute e.g.

<datawad type="blah">
<datawad type="floorp">sloop</datawad>
<datawad type="gloorp">droop</datawad>
</datawad>

I can guess that the former would be easier to develop initially as it
would we more conducive to schema generators (e.g. web service tools
like Java2WSDL, etc.) but since it is tied to types change manangement
might be more difficult than in the latter case. Anyhoo any insight or
advice is greatly appreciated.
Thanks in advance,
D.
 
Reply With Quote
 
 
 
 
Toni Uusitalo
Guest
Posts: n/a
 
      01-27-2004
chapter 12 at
http://www.ibiblio.org/xml/books/effectivexml/
(chapter 11 might be worth reading too)

with respect,
Toni Uusitalo


"Brunswick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I am in the process of defining a protocol that my company will use to
> communicate with its customers. At the moment I'm scratching my head
> about one issue. Should I use type-specific elements to describe our
> entities
> e.g.
> <blah>
> <floorp>sloop</floorp>
> <gloorp>droop</gloorp>
> </blah>
>
> or have a generic element with a type attribute e.g.
>
> <datawad type="blah">
> <datawad type="floorp">sloop</datawad>
> <datawad type="gloorp">droop</datawad>
> </datawad>
>
> I can guess that the former would be easier to develop initially as it
> would we more conducive to schema generators (e.g. web service tools
> like Java2WSDL, etc.) but since it is tied to types change manangement
> might be more difficult than in the latter case. Anyhoo any insight or
> advice is greatly appreciated.
> Thanks in advance,
> D.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xquery on elements with attribute named 'type' kishjeff XML 2 12-17-2008 07:52 PM
Restricting a type by using an attribute on the element using the type? Arndt Jonasson XML 2 02-12-2007 10:09 AM
XML-Schema: Is there a way to make different type elements(each type has more than one Element) present in random order? Aray XML 1 01-05-2007 08:22 AM
picking value of one attribute based on a child elements attribute? XPath? vjethava@gmail.com XML 2 03-06-2006 05:19 AM
XSLT: Making attribute to parent attribute Bostonasian XML 1 09-18-2005 07:30 AM



Advertisments