-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes post #65: make AaltoInputProperties.P_RETAIN_ATTRIBUTE_GENERA…
…L_ENTITIES be the SAX feature key too.
- Loading branch information
1 parent
5deb3f4
commit 51d8bfa
Showing
4 changed files
with
37 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletions
19
src/test/java/com/fasterxml/aalto/sax/TestSAXParserFactoryImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
package com.fasterxml.aalto.sax; | ||
|
||
import org.xml.sax.SAXNotRecognizedException; | ||
import org.xml.sax.SAXNotSupportedException; | ||
import com.fasterxml.aalto.AaltoInputProperties; | ||
|
||
public class TestSAXParserFactoryImpl extends base.BaseTestCase { | ||
|
||
public void testSetGetFeatureExternalGeneralEntities() throws SAXNotRecognizedException, SAXNotSupportedException { | ||
public class TestSAXParserFactoryImpl extends base.BaseTestCase | ||
{ | ||
// [aalto-xml#65] | ||
public void testSetGetFeatureExternalGeneralEntities() throws Exception | ||
{ | ||
SAXParserFactoryImpl saxParserFactory = new SAXParserFactoryImpl(); | ||
saxParserFactory.setFeature("http://xml.org/sax/features/external-general-entities", false); | ||
assertFalse(saxParserFactory.getFeature("http://xml.org/sax/features/external-general-entities")); | ||
assertFalse(saxParserFactory.getFeature(AaltoInputProperties.P_RETAIN_ATTRIBUTE_GENERAL_ENTITIES)); | ||
|
||
saxParserFactory.setFeature("http://xml.org/sax/features/external-general-entities", true); | ||
assertTrue(saxParserFactory.getFeature("http://xml.org/sax/features/external-general-entities")); | ||
saxParserFactory.setFeature(AaltoInputProperties.P_RETAIN_ATTRIBUTE_GENERAL_ENTITIES, true); | ||
assertTrue(saxParserFactory.getFeature(AaltoInputProperties.P_RETAIN_ATTRIBUTE_GENERAL_ENTITIES)); | ||
} | ||
|
||
} |