< prev index next >

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

Print this page




 310 
 311         String[] hrefs1 = {"pathto/DocFunc2.xml"};
 312         Source[] returnValues1 = {new StreamSource(xml_doc2)};
 313         URIResolver docResolver = new XslResolver(hrefs1, returnValues1);
 314         SAXSource xslDocSource = new SAXSource(new InputSource(new File(xsl_doc).toURI().toASCIIString()));
 315         StreamSource xmlDocSource = new StreamSource(new File(xml_doc));
 316         return new Object[][]{
 317             // for resolving DTD, import and include in xsl
 318             {false, true, xml_catalog, xslSourceDTD, xmlSourceDTD, null, ""},
 319             {false, true, xml_bogus_catalog, new SAXSource(new InputSource(new StringReader(xsl_include))),
 320                 new StreamSource(new StringReader(xml_xsl)), resolver, ""},
 321             {true, true, xml_bogus_catalog, new SAXSource(new InputSource(new StringReader(xsl_include))),
 322                 new StreamSource(new StringReader(xml_xsl)), resolver, ""},
 323             // for resolving reference by the document function
 324             {false, true, xml_catalog, xslDocSource, xmlDocSource, null, "Resolved by a catalog"},
 325             {false, true, xml_bogus_catalog, xslDocSource, xmlDocSource, docResolver, "Resolved by a resolver"},
 326             {true, true, xml_bogus_catalog, xslDocSource, xmlDocSource, docResolver, "Resolved by a resolver"}
 327         };
 328     }
 329 }
 330 


 310 
 311         String[] hrefs1 = {"pathto/DocFunc2.xml"};
 312         Source[] returnValues1 = {new StreamSource(xml_doc2)};
 313         URIResolver docResolver = new XslResolver(hrefs1, returnValues1);
 314         SAXSource xslDocSource = new SAXSource(new InputSource(new File(xsl_doc).toURI().toASCIIString()));
 315         StreamSource xmlDocSource = new StreamSource(new File(xml_doc));
 316         return new Object[][]{
 317             // for resolving DTD, import and include in xsl
 318             {false, true, xml_catalog, xslSourceDTD, xmlSourceDTD, null, ""},
 319             {false, true, xml_bogus_catalog, new SAXSource(new InputSource(new StringReader(xsl_include))),
 320                 new StreamSource(new StringReader(xml_xsl)), resolver, ""},
 321             {true, true, xml_bogus_catalog, new SAXSource(new InputSource(new StringReader(xsl_include))),
 322                 new StreamSource(new StringReader(xml_xsl)), resolver, ""},
 323             // for resolving reference by the document function
 324             {false, true, xml_catalog, xslDocSource, xmlDocSource, null, "Resolved by a catalog"},
 325             {false, true, xml_bogus_catalog, xslDocSource, xmlDocSource, docResolver, "Resolved by a resolver"},
 326             {true, true, xml_bogus_catalog, xslDocSource, xmlDocSource, docResolver, "Resolved by a resolver"}
 327         };
 328     }
 329 }

< prev index next >