473,569 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple colons in namespace names?

I am relatively new to XML, though I have taught myself a lot in the past
month. I keep seeing namespace names with multiple colons in them such
as:

"urn:oasis:name s:tc:entity:xml ns:xml:catalog"

but I can't find any information on exactly what that means. Is that a
namespace defined within a namespace defined within a namespace? Are they
all nested within the same XML file? Or if I know the URI for "urn"
(which I presume is the commonly known URI for the Universal Resource
Number schema) and look at that schema will I find a namespace
declaration for "oasis"? I presume it will be something like:

xmlns:oasis="wh erever the heck some default schema for OASIS is located"

Then if I look there I'm guessing I will find yet another schema with the
"names" namespace specified. Etc, etc, till I get to the declaration for
the catalog schema? It sure seems like a lot of hopping around when they
could have just specified the URI for the catalog schema in the first
place.

Thanks.
P.S. I understand that, technically, URIs don't need to point to any
actual file or even an actual server. However, I have found that all of
the ones I have explored actually do. We can discuss URIs later.
Jan 13 '07 #1
6 2217
In article <MP************ ************@ne ws.newsguy.com> ,
Grant Robertson <bo***@bogus.in validwrote:
>I am relatively new to XML, though I have taught myself a lot in the past
month. I keep seeing namespace names with multiple colons in them such
as:

"urn:oasis:nam es:tc:entity:xm lns:xml:catalog "

but I can't find any information on exactly what that means. Is that a
namespace defined within a namespace defined within a namespace?
Colons are used to separate the prefix from the local part in an XML
element name, but colons in the URI associated with the prefix have no
meaning as far as XML is concerned.

<foo:bar xmlns:foo="urn: b:c:d"/>

The colons in "foo:bar" and "xmlns:foo" mean something to the XML
processor, but the ones in "urn:b:c:d" don't.

-- Richard
--
"Considerat ion shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Jan 14 '07 #2
In article <eo***********@ pc-news.cogsci.ed. ac.uk>,
ri*****@cogsci. ed.ac.uk says...
>
<foo:bar xmlns:foo="urn: b:c:d"/>

The colons in "foo:bar" and "xmlns:foo" mean something to the XML
processor, but the ones in "urn:b:c:d" don't.

So when I see something like

"urn:oasis:name s:tc:entity:xml ns:xml:catalog"

defined as the namespace name for an Entity Catalog in the OASIS spec for
catalogs found at

http://www.oasis-open.org/committees...-xml-catalogs-
1.0.html#s.enti ty.catalog

then what am I to make of all those colons? How would I specify that
namespace in an XML document?

xmlns:catalog=" urn:oasis:names :tc:entity:xmln s:xml:catalog" ??

How the heck is my XML parser supposed to identify and find the DTD or
schema for that namespace and validate against it? Or is my software just
supposed to have the schema for that namespace hard-coded into it and
already know how to parse any elements or attributes scoped as belong to
that catalog namespace? This seems counter to the spirit of XML.
Jan 14 '07 #3
In article <MP************ ************@ne ws.newsguy.com> ,
Grant Robertson <bo***@bogus.in validwrote:
>then what am I to make of all those colons? How would I specify that
namespace in an XML document?

xmlns:catalog= "urn:oasis:name s:tc:entity:xml ns:xml:catalog" ??
Yes.
>How the heck is my XML parser supposed to identify and find the DTD or
schema for that namespace and validate against it?
Namespace URIs are not primarily to identify schemas and DTDs, though
they can be used for that.
>Or is my software just
supposed to have the schema for that namespace hard-coded into it and
already know how to parse any elements or attributes scoped as belong to
that catalog namespace?
You don't need a schema to parse it, only to validate it.

You can give a schema location with xsi:schemaLocat ion in your document.

Of course, one to to find DTDs and schemas is to use a catalogue.
Presumably you know about that, since the URI you are asking about is
the namespace URI for catalogues!

-- Richard
--
"Considerat ion shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Jan 14 '07 #4
In article <eo***********@ pc-news.cogsci.ed. ac.uk>,
ri*****@cogsci. ed.ac.uk says...
Of course, one to to find DTDs and schemas is to use a catalogue.
Presumably you know about that, since the URI you are asking about is
the namespace URI for catalogues!
Actually, I don't. That's why I was reading the spec. But I get your
point. They have an "official" name they want you to use and it is
supposed to be globally unique but I have to just trust them on that.
Then I can use a catalog file to allow my software to find the actual URI
of the schema or even just a mirror of that schema somewhere else.

You are correct, I improperly used "parse" as a synonym for "validate."
To me, it doesn't make much sense to parse without validation. It is very
important to me to ensure that data is correct before attempting to load
it into a memory structure for use by a program.
Jan 14 '07 #5
In article <MP************ ***********@new s.newsguy.com>,
Grant Robertson <bo***@bogus.in validwrote:
>To me, it doesn't make much sense to parse without validation. It is very
important to me to ensure that data is correct before attempting to load
it into a memory structure for use by a program.
Obviously data from unreliable sources has to be validated somehow.
But it doesn't have to be done with a general-purpose validator. It
can be done by your application as you use it to build the
structures, and typically it *has* to be done at least partly that
way, since schema languages can't express all the constraints
required.

And in many cases the data comes from a reliable source, and
validation is only useful for debugging. We run pipelines with
of the order of 100 steps; performing schema validation at every
stage would be very expensive.

-- Richard
--
"Considerat ion shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Jan 14 '07 #6
Since XML itself never actually interprets/dereferences the namespace
name, this isn't really an XML question. But:

Namespace names are URIs. After the scheme identifier (which is
delimited by the first colon), the permissibility and meaning of the
rest of the line is defined by that specific scheme.

XML doesn't care. As far as we're concerned, a namespace is just a
literal string that happens to be expressed in absolute-URI-reference
syntax because we know how to manage that set of values to avoid
unintended conflict/reuse.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Jan 15 '07 #7

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

Similar topics

88
5083
by: Tim Tyler | last post by:
PHP puts most of its functions into a big flat global namespace. That leads to short function names - but creates a namespace minefield for programmers. Lots of the functions are legacies from the days before PHP got object-oriented features. For instance we currently have:
4
6723
by: SilverShadow | last post by:
Hello, I'm having trouble with something that may be easily remedied. I use Cantera running on Python. I need to make multiple "Reactor()" objects and have them assigned a different (user defined) name. For example: reactors = for reac in reactors: reac = Reactor()
66
4927
by: Darren Dale | last post by:
Hello, def test(data): i = ? This is the line I have trouble with if i==1: return data else: return data a,b,c,d = test()
5
1691
by: Manu | last post by:
Hi, Here's what i want to accomplish. I want to make a list of frequenctly occuring words in a group of files along with the no of occurances of each The brute force method will be to read the file as a string,split,load the words into a dict with words as key and no of occurances as key. Load the next file ,iterate through the new words...
11
17807
by: Georg Teichtmeister | last post by:
Hello! We are developing a math - library for realtime applications and want to use some given mathlibraries as base(ipp, MTL, .. ). Our library is a wrapper for those and you should be able to select the underlying library by template parameter. Therefore we split up our library in two namespaces: The first one defines namespace-global...
7
7426
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; com.unFocus.Namespaces = new function() { this.register = function(namespace) { namespace = namespace.split('.');
6
5189
by: techBoy | last post by:
I am looking for a tool that can scan my soyrce code and check if a header file gets included more then once in a sequece of compiled code. Can some one guide me to such a tool !!
30
4080
by: Pep | last post by:
Is it best to include the code "using namespace std;" in the source or should each keyword in the std namespace be qualified by the namespace tag, such as std::cout << "using std namespace" << std::endl; Myself I am not sure which I prefer, it is certainly easier to specify that the std namespace is being used instead of tagging each...
9
1616
by: Jeremy | last post by:
I apologize if this is the wrong group, but my usenet provider doesn't carry any CSS-specific groups, and people in this group are likely to be CSS experts anyhow. My question is this: In HTML, the "id" attribute of an element can legally contain a colon character (":"). In a CSS declaration, how is this distinguished from a pseudoclass...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.