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

RE: qName/localName confusion

  • To: "'John Cowan'" <cowan@c...>
  • Subject: RE: qName/localName confusion
  • From: "Michael Kay" <michael.h.kay@n...>
  • Date: Thu, 18 Mar 2004 10:27:55 -0000
  • Cc: <xml-dev@l...>
  • In-reply-to: <20040318035004.GL12076@c...>
  • Thread-index: AcQMnCBTJ+IlRPDHRoGsgWxCOxpkhQANw/ag

qname localname
# 
# > Firstly, turning on the feature might fail. I don't know how many 
# > parsers don't support the feature; I would have to decide 
# whether to 
# > support such parsers or not; I would have to test the code 
# that handles such a failure.
# 
# This is a required feature.  Of course, that doesn't mean all 
# parsers actually do it.

We're talking about the namespace-prefixes feature: 

From XMLReader#setFeature:

All XMLReaders are required to support setting
http://xml.org/sax/features/namespaces to true and
http://xml.org/sax/features/namespace-prefixes to false.

and from ContentHandler#startElement:

The attribute list will contain attributes used for Namespace declarations
(xmlns* attributes) only if the
http://xml.org/sax/features/namespace-prefixes  property is true (it is
false by default, and support for a true value is optional).


# 
# > Secondly, the parser would then give me namespace 
# declarations in the 
# > attributes list that I'm not interested in. It would 
# presumably have 
# > to do extra work to put them there, and I would have to do 
# extra work 
# > to take them out again.
# 
# I don't follow this.  Setting namespace-prefixes means that 
# you get the prefixes associated with each element and 
# attribute that has one.
# It doesn't involve inserting new attributes.

See above.

Michael Kay


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-2013 All Rights Reserved.