2. Configuration
2.1. Configuring Namespace Support
The "http://xml.org/features/namespaces" feature controls general Namespace processing: when this feature is true (the default), Namespace URIs and local names must be available through the startElement and endElement callbacks in the ContentHandler interface, and through the various methods in the Attributes interface, and start/endPrefixMapping events must be reported.
This means the default value for the "http://xml.org/features/namespaces" feature should be true.
When I instantiate my SAXParser "directly" using the following code :
XMLReader myReader = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
I can check that the following code : myReader.getFeature("http://xml.org/sax/features/namespaces") returns "true".
That seems correct.
But when I use JAXP like this :
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
XMLReader myReader = saxParser.getXMLReader();
I can check that saxParser.isNamespaceAware() or myReader.getFeature("http://xml.org/sax/features/namespaces") both return false.
Is it normal ?
If it is, why isn't JAXP (or maybe xerces implementation of SAXParserFactory) respecting SAX2 specification ?
Thanks.
Jean-Guillaume.
P.S. : I hope I didn't make a mistake sending this question to the "general mailing-list" but I think the answer could be of some interest for different kind of projects.