473,467 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Namespaces

Hello,

I'm a little confused with namespaces and non qualified name :

If I write

<a xmlns:p="http://www.blabla.com">
<b/>
</a>

I should consider 'a' inside the 'http://www.blabla.com' namespace. Do I consider
too 'b' as a part of this namespace as their no default namespace ?

If yes what the interest of the xmlns attribute ?

Other point :

<a xmlns:p="http://www.blabla.com" xmlns="http://www.blibli.com">
<b/>
</a>

Do I consider 'a' and 'b' on the "http://www.blibli.com" namespace ?

If yes, what happened when writing :

<p:a xmlns:p="http://www.blabla.com" xmlns="http://www.blibli.com">
<b/>
</p:a>

Do I consider 'b' on the http://www.blibli.com namespace or http://www.blabla.com ?

Thanks in advances,

G.
Jul 20 '05 #1
3 3621
In article <b9**************************@posting.google.com >,
R.Georges <co*********@javanews.org> wrote:

<a xmlns:p="http://www.blabla.com">
<b/>
</a> I should consider 'a' inside the 'http://www.blabla.com'
namespace. Do I consider too 'b' as a part of this namespace as their
no default namespace ?
No, b is in no namespace.

(Some people - a few - write documents in which elements in no
namespace are interpreted according to the namespace of the enclosing
namespaced element, in the same way that most people make the
interpretation of no-namespace attributes depend on the element
they're attached to. But that's a matter of interpretation; as
far as the XML namespaces spec is concerned, such elements are not
in any namespace. XML schema's elementForm="unqualified" exists for
the benefit of these people.)
<a xmlns:p="http://www.blabla.com" xmlns="http://www.blibli.com">
<b/>
</a>

Do I consider 'a' and 'b' on the "http://www.blibli.com" namespace ?
Yes.
If yes, what happened when writing :

<p:a xmlns:p="http://www.blabla.com" xmlns="http://www.blibli.com">
<b/>
</p:a>

Do I consider 'b' on the http://www.blibli.com namespace or
http://www.blabla.com ?


a is in the blabla namespace and b is in the blibli namespace.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #2
ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
In article <b9**************************@posting.google.com >,
R.Georges <co*********@javanews.org> wrote:

<a xmlns:p="http://www.blabla.com">
<b/>
</a>

I should consider 'a' inside the 'http://www.blabla.com'
namespace. Do I consider too 'b' as a part of this namespace as
their no default namespace ?


No, b is in no namespace.


Note that in this example element "a" is also in no namespace. The
namespace declaration is only for elements prefixed with "p".

--
Dean Tiegs, NE¼-20-52-25-W4
“Confortare et esto robustus”
http://telusplanet.net/public/dctiegs/
Jul 20 '05 #3
R.Georges wrote:
<a xmlns:p="http://www.blabla.com">
<b/>
</a>

I should consider 'a' inside the 'http://www.blabla.com' namespace.


No, it's in no namespace. It must be 'p:a' to be in the
'http://www.blabla.com' namespace.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #4

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

Similar topics

18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
24
by: Marcin Vorbrodt | last post by:
Here is an example of my code: //Header file #include <vector> using std::vector; namespace Revelation { // class definitions, etc... // class members are of type std::vector }
2
by: Mike Morse | last post by:
What see sample that show xs:element where the xs namespace = http://www.w3.org/2001/XMLSchema However, I see another example with xsi: where xsi = http://www.w3.org/2001/XMLSchema-instance ...
3
by: Jim Heavey | last post by:
Trying to get the hang of Namespaces. I have primarly developed in VB and am transitioning to C# and the .Net Environment. I have worked a bit with Java as well in school about a year or so ago....
17
by: clintonG | last post by:
Using 2.0 with Master Pages and a GlobalBaseClass for the content pages. I understand the easy part -- the hierarchical structure of a namespace naming convention -- but the 2.0 IDE does not...
11
by: Random | last post by:
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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 projectplanning, coding, testing,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.