Skip to content

Commit

Permalink
Fix issue #51; if we have to create an XMLReader, make sure it's name…
Browse files Browse the repository at this point in the history
…space aware
  • Loading branch information
ndw committed Jan 29, 2013
1 parent 5fac356 commit f3f5e97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/com/xmlcalabash/util/XProcURIResolver.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ public Source resolve(String href, String base) throws TransformerException {
XMLReader reader = ssource.getXMLReader(); XMLReader reader = ssource.getXMLReader();
if (reader == null) { if (reader == null) {
try { try {
reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
saxParserFactory.setNamespaceAware(true); // Must be namespace aware
reader = saxParserFactory.newSAXParser().getXMLReader();
reader.setEntityResolver(this); reader.setEntityResolver(this);
ssource.setXMLReader(reader); ssource.setXMLReader(reader);
} catch (SAXException se) { } catch (SAXException se) {
Expand Down

0 comments on commit f3f5e97

Please sign in to comment.