[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: namespace URI of xmlns prefix

  • To: "John Heinstein" <jheinstein@e...>,<xml-dev@l...>
  • Subject: RE: namespace URI of xmlns prefix
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Fri, 15 Jul 2005 13:52:38 -0700
  • Thread-index: AcWJchQoVsoNj6vZQW2puQTXoli/RwADOq0g
  • Thread-topic: namespace URI of xmlns prefix

xmlns prefix
From http://www.w3.org/XML/xml-names-19990114-errata

"The prefix xmlns is used only to declare namespace bindings and is by
definition bound to the namespace name http://www.w3.org/2000/xmlns/. It
must not be declared. No other prefix may be bound to this namespace
name"


--
PITHY WORDS OF WISDOM 
We all work under a slight handicap, we're human. 

This posting is provided "AS IS" with no warranties, and confers no
rights.  

> -----Original Message-----
> From: John Heinstein [mailto:jheinstein@e...] 
> Sent: Friday, July 15, 2005 12:10 PM
> To: xml-dev@l...
> Subject:  namespace URI of xmlns prefix
> 
> Hi,
> 
> Could someone clarify part of the XML Namespaces spec for me?
> 
> The spec states that namespace declarations are a special category of
> attribute: "A namespace is *declared* using a family of 
> reserved attributes. Such an attribute's name must either be 
> |xmlns| or have 
> |xmlns:| as a prefix".
> 
> So if a namespace declaration like
> xmlns:foo="http://www.foo.com/some.namespace" is made, and 
> that declaration is considered a type of attribute, then:
> 
> - the namespace prefix of the attribute is "xmlns"
> - the local name of the attribute is "foo"
> - the value of the attribute is "http://www.foo.com/some.namespace"
> 
> But what is the namespace URI of the attribute? What 
> namespace does the prefix "xmlns" belong to?
> 
> And then you have default namespace declarations, such as 
> xmlns="http://www.foo.com/some.namespace".
> 
> - the namespace prefix of the attribute is an empty string: ''
> - the local name of the attribute is "xmlns"
> - the value of the attribute is "http://www.foo.com/some.namespace"
> 
> And I presume in this case, the namespace URI would be an 
> empty string?
> 
> I'm asking because I'm unsure how a DOM method like 
> getAttributeNS is supposed to deal with namespace 
> declarations. Would xmlns attributes simply be ignored in this case?
> 
> John Heinstein
> 
> --
> John Heinstein
> VP Software Development
> Engage Interactive
> 921 College Hill Rd.
> Fredericton, NB
> E3B 6Z7
> 
> phone: (506) 460-1627
> fax: (506) 460-1626
> 
> http://www.engageinteractive.com
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org 
> <http://www.xml.org>, an initiative of OASIS 
> <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
> 
> 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.