Declaration vs definition

Discussion in 'XML' started by caferias, Jul 19, 2006.

  1. caferias

    caferias Guest

    Hello, I'm curious about the difference between the term "declaration"
    and "definition" in the context of XML. Where is the difference?

    Greetings: Fernando
     
    caferias, Jul 19, 2006
    #1
    1. Advertising

  2. caferias wrote:
    > Hello, I'm curious about the difference between the term "declaration"
    > and "definition" in the context of XML. Where is the difference?


    Where, in specific?
     
    Joe Kesselman, Jul 19, 2006
    #2
    1. Advertising

  3. caferias wrote:
    > Hello, I'm curious about the difference between the term "declaration"
    > and "definition" in the context of XML. Where is the difference?


    they both start with "de" and end with "tion" ; the other characters are
    the difference (notice that in the context of XML the case matters)

    :)

    --
    Cordialement,

    ///
    (. .)
    --------ooO--(_)--Ooo--------
    | Philippe Poulard |
    -----------------------------
    http://reflex.gforge.inria.fr/
    Have the RefleX !
     
    Philippe Poulard, Jul 19, 2006
    #3
  4. caferias

    Alain Frisch Guest

    "caferias" , dans le message (comp.text.xml:74580), a écrit :
    > Hello, I'm curious about the difference between the term "declaration"
    > and "definition" in the context of XML. Where is the difference?


    My understanding is that a "declaration" creates a fresh object
    and binds it to a name, whereas a "definition" only binds an existing
    object to a name. In particular, two definitions with the same content
    denote equivalent things, whereas two declarations with the same
    content create different things. A definition is just about
    naming things; a declaration is generative.

    -- Alain
     
    Alain Frisch, Jul 19, 2006
    #4
  5. Alain Frisch wrote:
    > My understanding is that a "declaration" creates a fresh object
    > and binds it to a name, whereas a "definition" only binds an existing
    > object to a name. In particular, two definitions with the same content
    > denote equivalent things, whereas two declarations with the same
    > content create different things. A definition is just about
    > naming things; a declaration is generative.


    That's the convention in many programming-language contexts.

    To know how this applies to XML, though, we'd have to see the context in
    which it was used.
     
    Joe Kesselman, Jul 19, 2006
    #5
  6. [declaration and definition in XML]

    Joe Kesselman wrote:
    > To know how this applies to XML, though, we'd have to see the context in
    > which it was used.


    When I first read the OP's post I thought of document type declaration
    and document type definition.
    --
    Johannes Koch
    Spem in alium nunquam habui praeter in te, Deus Israel.
    (Thomas Tallis, 40-part motet)
     
    Johannes Koch, Jul 19, 2006
    #6
  7. Johannes Koch wrote:
    > When I first read the OP's post I thought of document type declaration
    > and document type definition.


    .... Perhaps. If so:

    "[Definition:] The XML document type declaration contains or points to
    markup declarations that provide a grammar for a class of documents.
    This grammar is known as a document type definition, or DTD. The
    document type declaration can point to an external subset (a special
    kind of external entity) containing markup declarations, or can contain
    the markup declarations directly in an internal subset, or can do both.
    The DTD for a document consists of both subsets taken together."

    As I read that, the Document Type Declaration is production 28 in the
    XML grammar (doctypedecl), whereas the Document Type Definition is
    specifically that portion of the declaration which is described by
    production 29 (markupdecl).

    But I've never seen anyone use the term "document type declaration"
    outside this specification. It's generally just called "the doctype", or
    "the DTD" (though officially, DTD refers only to the definition).

    Does that help?

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Jul 20, 2006
    #7
  8. Joe Kesselman wrote:

    > But I've never seen anyone use the term "document type declaration"
    > outside this specification.


    I use this term quite frequently :)
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
     
    Johannes Koch, Jul 20, 2006
    #8
  9. caferias

    Alain Frisch Guest

    Johannes Koch , dans le message (comp.text.xml:74592), a écrit :
    > When I first read the OP's post I thought of document type declaration
    > and document type definition.


    As for me, I thought of the XML Schema spec, with element and attribute
    declarations, but type and group definitions.
     
    Alain Frisch, Jul 20, 2006
    #9
    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. Razvan
    Replies:
    4
    Views:
    625
    Razvan
    Feb 10, 2005
  2. Jianli Shen
    Replies:
    1
    Views:
    598
    Victor Bazarov
    Mar 13, 2005
  3. Ark
    Replies:
    1
    Views:
    427
    Chris Torek
    Aug 7, 2004
  4. Jon Slaughter
    Replies:
    4
    Views:
    454
    Jon Slaughter
    Oct 26, 2005
  5. Pierre Yves
    Replies:
    2
    Views:
    495
    Pierre Yves
    Jan 10, 2008
Loading...

Share This Page