< prev index next >

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

Print this page




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


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

< prev index next >