< prev index next >

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

Print this page




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


 253 
 254     /*
 255        DataProvider: for testing XSL import and include
 256        Data: set use_catalog, use_catalog, catalog file, xsl file, xml file, a URIResolver, expected
 257      */
 258     @DataProvider(name = "data_XSLC")
 259     public Object[][] getDataXSLC() {
 260         SAXSource xslSourceDTD = new SAXSource(new InputSource(new StringReader(xsl_includeDTD)));
 261         StreamSource xmlSourceDTD = new StreamSource(new StringReader(xml_xslDTD));
 262 
 263         SAXSource xslDocSource = new SAXSource(new InputSource(new File(xsl_doc).toURI().toASCIIString()));
 264         StreamSource xmlDocSource = new StreamSource(new File(xml_doc));
 265         return new Object[][]{
 266             // for resolving DTD, import and include in xsl
 267             {false, true, xml_catalog, xslSourceDTD, xmlSourceDTD, null, ""},
 268             // for resolving reference by the document function
 269             {false, true, xml_catalog, xslDocSource, xmlDocSource, null, "Resolved by a catalog"},
 270         };
 271     }
 272 }

< prev index next >