473,725 Members | 2,017 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 2224
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
5140
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
6729
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
5012
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
1697
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 increment the value if there is
11
17822
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 functions which call the baselibrary functions. These are templatefunctions which some
7
7438
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
5204
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
4111
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 member of the namespace?
9
1620
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 specifier? For example, if I have the following element
0
9257
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8096
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4517
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4782
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2634
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.