XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Shannon MSubject: Stylus Studio install breaks working directory for .NET XSL transform
Author: Shannon M
Date: 16 May 2006 03:10 PM
For the method:
System.Xml.Xsl.XslCompiledTransform.Load("unqualified.xsl")


On a device without Stylus Studio installed,
refers to the ASP.NET application path (the working directory).

On a device with Stylus Studio installed,
refers to the Stylus Studio\bin directory.


Can you comment on whether this is expected, and if not, file a bug report for me?
The .NET documentation provides examples of using the method unqualified, can you recommend a fix to make my development PC operate normally?


----- error log -----
Could not find file 'C:\Program Files\Stylus Studio 2006 Release 2 XML Enterprise Edition\bin\unqualified.xsl'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Stylus Studio 2006 Release 2 XML Enterprise Edition\bin\unqualified.xsl'.

Source Error:


Line 7: {
Line 8: System.Xml.Xsl.XslCompiledTransform xslt = new System.Xml.Xsl.XslCompiledTransform();
Line 9: xslt.Load("unqualified.xsl");
Line 10: System.Xml.XmlReader xr = SRMCommon.Data.Utility.EasySqlXmlReader(
Line 11: System.Web.Configuration.WebConfigurationManager.ConnectionStrings["SYSDBCompatible"],


Source File: c:\Inetpub\wwwroot\testapp\testpage.aspx Line: 9

Stack Trace:

[FileNotFoundException: Could not find file 'C:\Program Files\Stylus Studio 2006 Release 2 XML Enterprise Edition\bin\unqualified.xsl'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014413
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +113
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) +93
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +71
System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver) +60
System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver) +439
System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil) +56
System.Xml.Xsl.XslCompiledTransform.CompileToQil(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) +116
System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) +106
System.Xml.Xsl.XslCompiledTransform.Load(String stylesheetUri) +130

Postnext
Ivan PedruzziSubject: Stylus Studio install breaks working directory for .NET XSL transform
Author: Ivan Pedruzzi
Date: 16 May 2006 06:37 PM
Hi Shannon,

I am not sure I understand the problem.
How do you run the your c# code?

In you are running an Active Server Page it's better to use the full path to the resource.

It is always dangerous rely on the "current directory" because the process hosting your transformation could change it.

See the ASP documentation to map a virtual to a real path
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/270433db-6a1a-42b1-86fa-9c4ca07b75e1.asp


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Shannon MSubject: Stylus Studio install breaks working directory for .NET XSL transform
Author: Shannon M
Date: 17 May 2006 12:20 AM
I'm aware of that, which is why my application current works.
However, I didn't ask how to fix my application.
I asked how to fix yours.

That's the twice (and I've only asked two questions thus far) that I've asked about a potential bug in your application, and you've told me I should change my design strategy to address it. Stylus Studio is supposed to save me time, not cost it.

Now, obviously, the code I gave you is not my application. It is a test meant to demonstrate (without providing you proprietary code) that the installation of your product made the .NET library perform in a fashion other than that documented by Microsoft. Did I overlook something?

Given that I did not, if I had security concerns, it would be that this product changed the working directory for compiled transforms running in web pages on my development PC. That sounds like a risk to me.

Postnext
Ivan PedruzziSubject: Stylus Studio install breaks working directory for .NET XSL transform
Author: Ivan Pedruzzi
Date: 17 May 2006 10:35 AM
Originally Posted: 17 May 2006 10:34 AM
>I'm aware of that, which is
>why my application current
>works.
>However, I didn't ask how to
>fix my application.
>I asked how to fix yours.

Stylus Studio doesn't execute any code that could possibly change the working directory of other processes other then its on sub-processes for instance when it executes command-line tools.

We will try to reproduce the behavior in house.

If you have any additional details let us know.

Thank You
Ivan



Ivan Pedruzzi
Stylus Studio Team

Posttop
Ivan PedruzziSubject: Stylus Studio install breaks working directory for .NET XSL transform
Author: Ivan Pedruzzi
Date: 17 May 2006 04:36 PM

I wonder how your appliccation could possible work with a relative path.

I tried to build a sample ASP+ page with the following code

public partial class _Default : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e){
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load("sampleBooksToCatalog.xsl");
}
}

and I get

Line 14: {
Line 15: System.Xml.Xsl.XslCompiledTransform xslt = new System.Xml.Xsl.XslCompiledTransform();
Line 16: xslt.Load("sampleBooksToCatalog.xsl");
Line 17: }
Line 18: }
Source File: c:\inetpub\wwwroot\ASPTest\Default.aspx.cs Line: 16
Stack Trace:
[FileNotFoundException: Could not find file 'C:\WINNT\system32\sampleBooksToCatalog.xsl'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014381
...

Notice that IIS uses C:\WINNT\system32 as base path

Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.