473,326 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Declaration vs definition

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

Greetings: Fernando

Jul 19 '06 #1
8 1681
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?
Jul 19 '06 #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?
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 !
Jul 19 '06 #3
"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
Jul 19 '06 #4
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.
Jul 19 '06 #5
[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)
Jul 19 '06 #6
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
Jul 20 '06 #7
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.)
Jul 20 '06 #8
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.
Jul 20 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Razvan | last post by:
Hi ! Consider the following XML element: <!ELEMENT value (#PCDATA)> <!ATTLIST value year CDATA #IMPLIED>
8
by: newmans | last post by:
Perhaps one of the experts can straighten me out on this point... In Bjarne Stroustrup's book 'The C++ Programming Language' 3rd Edition, section 4.9, indicates that typedef complex<short>...
3
by: Michael Sgier | last post by:
Hello with the original code below I get the error: "forward declaration of `struct CPlayer'" class CPlayer; // what does this do? Instantiate the class CPlayer? // what's a forward...
10
by: Kobu | last post by:
My question is about the use and meaning of the terms "declaration" and "definition" as it pertains to the C language. I've read sources that mix the two up when talking about such things as...
25
by: venky | last post by:
Hi main() { int x; /* it declaration or defination??*/ }
4
by: Steve | last post by:
Hi, I always though to return an instance of a class by value, it had to be defined - i.e. forward declaration isn't good enough? Consider the following code snippet: class RGBA; class...
9
by: Jess | last post by:
Hello, I was told that if I declare a static class constant like this: class A{ static const int x = 10; }; then the above statement is a declaration rather than a definition. As I've...
15
by: vaib | last post by:
hi to all.i'd like to know the actual difference between variable declaration and definition.it would be very helpful if anyone out there wud help me out with this thing.i'm writing here after here...
11
by: Jef Driesen | last post by:
I have the following problem in a C project (but that also needs to compile with a C++ compiler). I'm using a virtual function table, that looks like this in the header file: typedef struct...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.