From: AUBRY, S. (COFRAMI) <Ste...@ai...> - 2005-11-09 14:31:00
|
Hi David, The same error appear, i don't know how i can do to solve the problem. In debug mode, the error is occured to the code line= "transformer.transform(Xml,outResult);" And all the URLs are well-formed. Thanks for your help , St=E9phane Calling : XSL xsl_file =3D new XSL(); xsl_file.Transform(this.reglebox.Text,= url_executable+"schematron-report.xsl",lien_temp); My XSL Class : using System; using System.IO; using System.Xml; using javax.xml.transform; using javax.xml.transform.stream; using net.sf.saxon; namespace RulesToHtml { /// <summary> /// Summary description for XSL. /// </summary> public class XSL =0D { =0D =0D //Constructors public XSL(){ } public void Transform(string inXML, string inXSL, string output) { StreamSource inputXml_Source =3D new StreamSource(new= java.io.FileInputStream(inXML)); inputXml_Source.setSystemId(inXML); StreamSource inputXsl_Source =3D new StreamSource(new= java.io.FileInputStream(inXSL)); inputXsl_Source.setSystemId(inXSL); StreamWriter sw =3D new StreamWriter(output); sw.Write(DoTransform(inputXml_Source, inputXsl_Source)); sw.Close(); } private static string DoTransform(StreamSource Xml, StreamSource Xsl) { java.lang.System.setProperty("javax.xml.transform.TransformerFactory",= "net.sf.saxon.TransformerFactoryImpl"); StreamResult outResult =3D new StreamResult(); java.io.ByteArrayOutputStream outputXmlResult =3D new= java.io.ByteArrayOutputStream(); outResult.setOutputStream(outputXmlResult); TransformerFactory trans =3D TransformerFactory.newInstance(); Transformer transformer =3D trans.newTransformer(Xsl); transformer.transform(Xml,outResult); return outputXmlResult.toString(); } } } This mail has originated outside your organization, either from an external= partner or the Global Internet. Keep this in mind if you answer this= message. |