< prev index next >

test/javax/xml/jaxp/unittest/catalog/CatalogSupport3.java

Print this page




 263 
 264     /*
 265        DataProvider: for testing XSL import and include
 266        Data: set use_catalog, use_catalog, catalog file, xsl file, xml file, a URIResolver, expected
 267      */
 268     @DataProvider(name = "data_XSLC")
 269     public Object[][] getDataXSLC() {
 270         SAXSource xslSourceDTD = new SAXSource(new InputSource(new StringReader(xsl_includeDTD)));
 271         StreamSource xmlSourceDTD = new StreamSource(new StringReader(xml_xslDTD));
 272 
 273         SAXSource xslDocSource = new SAXSource(new InputSource(new File(xsl_doc).toURI().toASCIIString()));
 274         StreamSource xmlDocSource = new StreamSource(new File(xml_doc));
 275         return new Object[][]{
 276             // for resolving DTD, import and include in xsl
 277             {true, false, xml_catalog, xslSourceDTD, xmlSourceDTD, null, ""},
 278             // for resolving reference by the document function
 279             {true, false, xml_catalog, xslDocSource, xmlDocSource, null, "Resolved by a catalog"},
 280         };
 281     }
 282 }
 283 


 263 
 264     /*
 265        DataProvider: for testing XSL import and include
 266        Data: set use_catalog, use_catalog, catalog file, xsl file, xml file, a URIResolver, expected
 267      */
 268     @DataProvider(name = "data_XSLC")
 269     public Object[][] getDataXSLC() {
 270         SAXSource xslSourceDTD = new SAXSource(new InputSource(new StringReader(xsl_includeDTD)));
 271         StreamSource xmlSourceDTD = new StreamSource(new StringReader(xml_xslDTD));
 272 
 273         SAXSource xslDocSource = new SAXSource(new InputSource(new File(xsl_doc).toURI().toASCIIString()));
 274         StreamSource xmlDocSource = new StreamSource(new File(xml_doc));
 275         return new Object[][]{
 276             // for resolving DTD, import and include in xsl
 277             {true, false, xml_catalog, xslSourceDTD, xmlSourceDTD, null, ""},
 278             // for resolving reference by the document function
 279             {true, false, xml_catalog, xslDocSource, xmlDocSource, null, "Resolved by a catalog"},
 280         };
 281     }
 282 }

< prev index next >