Loading xslt using C# with J# redist and xalan plugin for .NET
--------------------------------------------------------------

         Key: XALANJ-2214
         URL: http://issues.apache.org/jira/browse/XALANJ-2214
     Project: XalanJ2
        Type: Bug
    Reporter: [EMAIL PROTECTED]
    Priority: Critical


I'm trying to load an xsl file using C#, the J# redist and the xalan plugin. 
Whenever the code gets to the 'tf.newTemplates(xsltSource);' line I get an 
error 'The given path's format is not supported'. If I remove the loading of 
the xsl file the code successfuly loads the xml document and produes an output 
file. Attached is the code and the xsl file. 

try 
{ 
javax.xml.transform.TransformerFactory tf = 
javax.xml.transform.TransformerFactory.newInstance(); 
javax.xml.transform.Source xsltSource = new 
javax.xml.transform.stream.StreamSource(@"C:\test.xsl"); 
javax.xml.transform.Templates templates = tf.newTemplates(xsltSource); 
javax.xml.transform.Transformer transformer = templates.newTransformer(); 
javax.xml.transform.stream.StreamSource xmlSource = new 
javax.xml.transform.stream.StreamSource(@"C:\merged.xml"); 
javax.xml.transform.Result htmlResult = new 
javax.xml.transform.stream.StreamResult(@"C:\out.txt"); 
transformer.transform(xmlSource,htmlResult); 
} 
catch (Exception ex) 
{ 
Console.Write(ex.StackTrace.ToString()); 
} 


<?xml version="1.0"?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
> 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to