OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] qName/localName confusion

[ Lists Home | Date Index | Thread Index ]

# 
# > 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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS