Fops,

In HEAD, ///apps/FOFileHAndler.java contains the following:

protected static XMLReader createParser() throws FOPException {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
factory.setFeature(
"http://xml.org/sax/features/namespace-prefixes";, true);
return factory.newSAXParser().getXMLReader();
} catch (SAXNotSupportedException se) {
throw new FOPException("Error: You need a parser which allows the"
+ " http://xml.org/sax/features/namespace-prefixes";
+ " feature to be set to true to support namespaces", se);



I would be inclined to modify that to:


protected static XMLReader createParser() throws FOPException {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
return factory.newSAXParser().getXMLReader();
} catch (SAXNotSupportedException se) {
throw new FOPException("Error: You need a parser which allows the"
+ " http://xml.org/sax/features/namespaces";
+ " feature to be set to true to support namespaces", se);



That is, I would turn allow the namespace-prefixes feature to remain in its default 'false' state, but make sure the parser is namespace aware. I don't know that there is any reason for us to collect prefixes, rather than simply allowing the parser to keep track of the namespaces in effect and return namespace and local names. That's what I have done in alt-design without any regrets so far.


Peter
--
Peter B. West <http://www.powerup.com.au/~pbwest/resume.html>



Reply via email to