From: AUBRY, S. (COFRAMI) <ste...@ai...> - 2005-11-09 15:28:12
|
> Hi David, >=0D > The same error appear, i don't know how i can do to solve the problem. >=0D > In debug mode, the error is occured to the code line= "transformer.transform(Xml,outResult);" >=0D > And all the URLs are well-formed. >=0D > Thanks for your help , >=0D > St=E9phane >=0D > Calling : >=0D > XSL xsl_file =3D new XSL(); > xsl_file.Transform(this.reglebox.Text,= url_executable+"schematron-report.xsl",lien_temp); >=0D >=0D > My XSL Class : >=0D > 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> >=0D > public class XSL =0D > { > =0D > =0D >=0D > //Constructors > public XSL(){ } >=0D > public void Transform(string inXML, string inXSL, string output) > { >=0D > StreamSource inputXml_Source =3D new StreamSource(new= java.io.FileInputStream(inXML)); > inputXml_Source.setSystemId(inXML); >=0D > 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(); >=0D > } >=0D > private static string DoTransform(StreamSource Xml, StreamSource Xsl) > { >=0D > java.lang.System.setProperty("javax.xml.transform.TransformerFactory",= "net.sf.saxon.TransformerFactoryImpl"); >=0D > StreamResult outResult =3D new StreamResult(); >=0D > java.io.ByteArrayOutputStream outputXmlResult =3D new= java.io.ByteArrayOutputStream(); >=0D > outResult.setOutputStream(outputXmlResult); >=0D > TransformerFactory trans =3D TransformerFactory.newInstance(); >=0D > Transformer transformer =3D trans.newTransformer(Xsl); >=0D > transformer.transform(Xml,outResult); >=0D > return outputXmlResult.toString(); > } >=0D >=0D > } > } >=0D >=0D >=0D >=0D >=0D =0D This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. |