471,873 Members | 985 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

XML Naming Conventions

Does the use of DTD, XML Schema and similar constructs adopt
the use of C# naming conventions? If so how do I make the distinction
of how to apply C# conventions with XML elements, attributes and so
on? Any referrals to resources that discuss or document XML Naming
Conventions?

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
Nov 16 '05 #1
3 4176
W3C.ORG publishes the XML standards. If you're talking about an XML
document, and naming tags (nodes) and attributes in particular, the naming
convention depends on what you're trying to do. For general purpose stuff,
you can make up your own. If you're trying to implement functionality
through an XML-based standard (like SOAP) there are specific guidelines and
structures (SOAP standards are also published by W3C on their website).

Thanks,
Michael C., MCDBA

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Does the use of DTD, XML Schema and similar constructs adopt
the use of C# naming conventions? If so how do I make the distinction
of how to apply C# conventions with XML elements, attributes and so
on? Any referrals to resources that discuss or document XML Naming
Conventions?

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

Nov 16 '05 #2
Hello Michael,

I am well aware of W3C and work with their standards. As a result
of that awareness I happened upon a linked comment that alleged the
W3C had defined naming conventions but the link only resolved to the
W3C 'home page' and after rooting around at the W3C site regardless
I was not able to locate any specific naming conventions in the context
I was expecting and hoping to find as those published by Microsoft's
..NET Framework General Reference Naming Guidelines [1].

To help clarify, I have read comments that compared the declaration
of XML elements to classes and class members and so on. I'd like to
learn more about how to think when defining and declaring XML
elements that may correlate to class definitions.

For example, I know XML is case sensitive but when I name XML
elements by which naming guideline am I motivated to declare an
element, as book, Book, bookStore or BookStore and how may
the declaration and its child elements correlate to any named counterpart
which may exist in my code when used to parse and process the XML?

The Visual Studio Coding Techniques [2] is helpful but does not
make the corrolary with XML elements.

Searching MSDN has not turned up anything specific in the context
I am attempting to convey.

In a nutshell, I want to learn if it is a correct perception that a well
designed XML schemata naming convention can be thought of as
equivalent to that of designing a class library and if so how to correlate
the constituent XML elements and child decedants by name to
class library counterparts?

Clear as mud :-)

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

[1]
http://msdn.microsoft.com/library/de...Guidelines.asp
[2]
http://msdn.microsoft.com/library/de...techniques.asp
"Michael C" <mi******@nospam.org> wrote in message
news:UN**********************@news4.srv.hcvlny.cv. net...
W3C.ORG publishes the XML standards. If you're talking about an XML
document, and naming tags (nodes) and attributes in particular, the naming
convention depends on what you're trying to do. For general purpose stuff, you can make up your own. If you're trying to implement functionality
through an XML-based standard (like SOAP) there are specific guidelines and structures (SOAP standards are also published by W3C on their website).

Thanks,
Michael C., MCDBA

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Does the use of DTD, XML Schema and similar constructs adopt
the use of C# naming conventions? If so how do I make the distinction
of how to apply C# conventions with XML elements, attributes and so
on? Any referrals to resources that discuss or document XML Naming
Conventions?

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


Nov 16 '05 #3
Apart from the standard naming rules (don't start element names with "xml",
element names can't contain spaces, yadda yadda), the naming conventions are
pretty much set by the application you're using. If you're asking whether
you should prefix elements that are supposed to contain int values with
"int", that's pretty much your choice, unless the particular protocol or
application you're using dictates differently. The only addition I would
make is that personally I try to stay away from using custom element names
that are the same as commonly used tags in other protocols (i.e., using a
<title> tag). I've heard of people having issues with using HTML-type tag
names when they are using HTTP. In fact, that's one of the reasons the
soap: namespace was added to the SOAP standard... to avoid conflicts like
this.

If you want to know how .NET converts your object names to XML elements,
serialize some of them and look at the resultant XML docs.

Thanks,
Michael C., MCDBA

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:xi*******************@twister.rdc-kc.rr.com...
Hello Michael,

I am well aware of W3C and work with their standards. As a result
of that awareness I happened upon a linked comment that alleged the
W3C had defined naming conventions but the link only resolved to the
W3C 'home page' and after rooting around at the W3C site regardless
I was not able to locate any specific naming conventions in the context
I was expecting and hoping to find as those published by Microsoft's
.NET Framework General Reference Naming Guidelines [1].

To help clarify, I have read comments that compared the declaration
of XML elements to classes and class members and so on. I'd like to
learn more about how to think when defining and declaring XML
elements that may correlate to class definitions.

For example, I know XML is case sensitive but when I name XML
elements by which naming guideline am I motivated to declare an
element, as book, Book, bookStore or BookStore and how may
the declaration and its child elements correlate to any named counterpart
which may exist in my code when used to parse and process the XML?

The Visual Studio Coding Techniques [2] is helpful but does not
make the corrolary with XML elements.

Searching MSDN has not turned up anything specific in the context
I am attempting to convey.

In a nutshell, I want to learn if it is a correct perception that a well
designed XML schemata naming convention can be thought of as
equivalent to that of designing a class library and if so how to correlate
the constituent XML elements and child decedants by name to
class library counterparts?

Clear as mud :-)

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

[1]
http://msdn.microsoft.com/library/de...Guidelines.asp [2]
http://msdn.microsoft.com/library/de...techniques.asp

"Michael C" <mi******@nospam.org> wrote in message
news:UN**********************@news4.srv.hcvlny.cv. net...
W3C.ORG publishes the XML standards. If you're talking about an XML
document, and naming tags (nodes) and attributes in particular, the naming convention depends on what you're trying to do. For general purpose

stuff,
you can make up your own. If you're trying to implement functionality
through an XML-based standard (like SOAP) there are specific guidelines

and
structures (SOAP standards are also published by W3C on their website).

Thanks,
Michael C., MCDBA

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
Does the use of DTD, XML Schema and similar constructs adopt
the use of C# naming conventions? If so how do I make the distinction
of how to apply C# conventions with XML elements, attributes and so
on? Any referrals to resources that discuss or document XML Naming
Conventions?

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/



Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Cristof Falk | last post: by
7 posts views Thread by cmiddlebrook | last post: by
1 post views Thread by clintonG | last post: by
4 posts views Thread by Mark Broadbent | last post: by
5 posts views Thread by rastaman | last post: by
9 posts views Thread by kevininstructor | last post: by
35 posts views Thread by Smithers | last post: by
1 post views Thread by Philipp Post | last post: by
reply views Thread by zermasroor | last post: by

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.