You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2005/11/01 22:56:56 UTC

[jira] Commented: (XALANJ-2214) Loading xslt using C# with J# redist and xalan plugin for .NET

    [ http://issues.apache.org/jira/browse/XALANJ-2214?page=comments#action_12356534 ] 

Brian Minchau commented on XALANJ-2214:
---------------------------------------

Lee,
The message "The given path's ... not supported" is not a Xalan-J message.
The @ character in you Java code is not correct
The backslashes in your Strings, "C:\test.xsl"  etc. are also probably wrong as they will be interpreted by a Java compiler to escape the next charcter. For example  "C:\notest.xsl" would interpret "\n" as a newline character. 

The problem looks invalid to me, and it looks like a J# issue because it isn't producing good Java code, nothing to do with Xalan.

> 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: lee.shaw@accenture.com
>     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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org