type-specific elements vs type attribute

Discussion in 'XML' started by Brunswick, Jan 26, 2004.

  1. Brunswick

    Brunswick Guest

    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.
    Brunswick, Jan 26, 2004
    #1
    1. Advertising

  2. chapter 12 at
    http://www.ibiblio.org/xml/books/effectivexml/
    (chapter 11 might be worth reading too)

    with respect,
    Toni Uusitalo


    "Brunswick" <> wrote in message
    news:...
    > 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.
    Toni Uusitalo, Jan 27, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marrow
    Replies:
    0
    Views:
    4,982
    Marrow
    Jul 4, 2003
  2. Replies:
    2
    Views:
    1,066
    Henry S. Thompson
    Mar 6, 2006
  3. =?Utf-8?B?SmF2?=

    Is ViwState Page-Specific or UserControl-Specific

    =?Utf-8?B?SmF2?=, Aug 16, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    521
    =?Utf-8?B?SmF2?=
    Aug 16, 2006
  4. kishjeff
    Replies:
    2
    Views:
    751
    kishjeff
    Dec 17, 2008
  5. William FERRERES
    Replies:
    7
    Views:
    204
    William FERRERES
    Jul 9, 2007
Loading...

Share This Page