< prev index next >

test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package stream.XMLStreamReaderTest;
  25 
  26 import javax.xml.stream.XMLInputFactory;
  27 import javax.xml.stream.XMLStreamReader;
  28 import javax.xml.stream.events.XMLEvent;
  29 
  30 import org.testng.Assert;

  31 import org.testng.annotations.Test;
  32 
  33 /*
  34  * @bug 6440324
  35  * @summary Test StAX can accept non-existent DTD if IS_VALIDATING if false.
  36  */

  37 public class IsValidatingTest {
  38 
  39     /**
  40      * File with non-existent DTD.
  41      */
  42     private static final String INPUT_FILE = "IsValidatingTest.xml";
  43     /**
  44      * File with internal subset and non-existent DTD.
  45      */
  46     private static final String INPUT_FILE_INTERNAL_SUBSET = "IsValidatingTestInternalSubset.xml";
  47 
  48     /**
  49      * Test StAX with IS_VALIDATING = false and a non-existent DTD.
  50      * Test should pass.
  51      *
  52      * Try to parse an XML file that references a a non-existent DTD.
  53      * Desired behavior:
  54      *     If IS_VALIDATING == false, then continue processing.
  55      *
  56      * Note that an attempt is made to read the DTD even if IS_VALIDATING == false.




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package stream.XMLStreamReaderTest;
  25 
  26 import javax.xml.stream.XMLInputFactory;
  27 import javax.xml.stream.XMLStreamReader;
  28 import javax.xml.stream.events.XMLEvent;
  29 
  30 import org.testng.Assert;
  31 import org.testng.annotations.Listeners;
  32 import org.testng.annotations.Test;
  33 
  34 /*
  35  * @bug 6440324
  36  * @summary Test StAX can accept non-existent DTD if IS_VALIDATING if false.
  37  */
  38 @Listeners({jaxp.library.FilePolicy.class})
  39 public class IsValidatingTest {
  40 
  41     /**
  42      * File with non-existent DTD.
  43      */
  44     private static final String INPUT_FILE = "IsValidatingTest.xml";
  45     /**
  46      * File with internal subset and non-existent DTD.
  47      */
  48     private static final String INPUT_FILE_INTERNAL_SUBSET = "IsValidatingTestInternalSubset.xml";
  49 
  50     /**
  51      * Test StAX with IS_VALIDATING = false and a non-existent DTD.
  52      * Test should pass.
  53      *
  54      * Try to parse an XML file that references a a non-existent DTD.
  55      * Desired behavior:
  56      *     If IS_VALIDATING == false, then continue processing.
  57      *
  58      * Note that an attempt is made to read the DTD even if IS_VALIDATING == false.


< prev index next >