1 /*
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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 parsers;
25
26 import java.io.File;
27 import java.io.IOException;
28
29 import javax.xml.parsers.DocumentBuilder;
30 import javax.xml.parsers.DocumentBuilderFactory;
31
32 import org.testng.Assert;
33 import org.testng.annotations.BeforeMethod;
34 import org.testng.annotations.Test;
35 import org.w3c.dom.Document;
36 import org.xml.sax.InputSource;
37 import org.xml.sax.SAXException;
38 import org.xml.sax.SAXParseException;
39 import org.xml.sax.helpers.DefaultHandler;
40
41 /*
42 * @bug 7157608
43 * @summary Test feature standard-uri-conformant works.
44 */
45 public class Bug7157608Test {
46 public static boolean isWindows = false;
47 static {
48 if (System.getProperty("os.name").indexOf("Windows") > -1) {
49 isWindows = true;
50 }
51 };
52
53 String xml1, xml2;
54
55 @BeforeMethod
56 protected void setUp() throws IOException {
57 File file1 = new File(getClass().getResource("Bug7157608.xml").getFile());
58 xml1 = file1.getPath().replace("\\", "\\\\");
59 File file2 = new File(getClass().getResource("Bug7157608_1.xml").getFile());
60 xml2 = file2.getPath();
61 }
62
63 // case 1
64 // standard-uri-confomant is false
|
1 /*
2 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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 parsers;
25
26 import java.io.File;
27 import java.io.IOException;
28
29 import javax.xml.parsers.DocumentBuilder;
30 import javax.xml.parsers.DocumentBuilderFactory;
31
32 import jaxp.library.JAXPTestUtilities;
33
34 import org.testng.Assert;
35 import org.testng.annotations.BeforeMethod;
36 import org.testng.annotations.Listeners;
37 import org.testng.annotations.Test;
38 import org.w3c.dom.Document;
39 import org.xml.sax.InputSource;
40 import org.xml.sax.SAXException;
41 import org.xml.sax.SAXParseException;
42 import org.xml.sax.helpers.DefaultHandler;
43
44 /*
45 * @bug 7157608
46 * @summary Test feature standard-uri-conformant works.
47 */
48 @Listeners({jaxp.library.FilePolicy.class})
49 public class Bug7157608Test {
50 public static boolean isWindows = false;
51 static {
52 if (System.getProperty("os.name").indexOf("Windows") > -1) {
53 isWindows = true;
54 }
55 };
56
57 String xml1, xml2;
58
59 @BeforeMethod
60 protected void setUp() throws IOException {
61 File file1 = new File(getClass().getResource("Bug7157608.xml").getFile());
62 xml1 = file1.getPath().replace("\\", "\\\\");
63 File file2 = new File(getClass().getResource("Bug7157608_1.xml").getFile());
64 xml2 = file2.getPath();
65 }
66
67 // case 1
68 // standard-uri-confomant is false
|