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