Solved

XslTransform works but all 'http' links from XSL file failed

Posted on 2003-11-17
5
215 Views
Last Modified: 2010-04-16
Hello.
I am trying to make some interface to xsl transfromation from C#.
My last function was:
//loads
public static void Transform(ref spXmlDoc, string sXslFile)
{
    XmlDocument spXslDoc = new XmlDocument();
    XslTransform oXslTransform = new XslTransform();
    oXslTransform.Load(sXslFile);
//  thats my function that successfully loads xml files to xmldocument object
    XmlUtils.XmlFileLoad(ref spXslDoc, sXslFile);
    StringWriter oStringWriter = new StringWriter();
    XmlResolver oResolver = new XmlResolver();
    oXslTransform.Transform(spXmlDoc.DocumentElement, null, oStringWriter, oResolver);
    spXmlDoc.LoadXml(oStringWriter.ToString());
}
So as I meant it works but only for 'local' files called from xsl.
if in the xsl there is something like that:
...
<!-- getting http base address from local files -->
<xsl:variable name="home" select="document('const.xml')/Constants/Address" />
<xsl:variable name="ClientProps" select="document(concat($home, 'properties.asp'))"/>
...
it's stopping. (I've checked that xsl on XMLSPY 5 Professional, it worked.)
So I'm sure there is something here about resolving url's, credentials and something else. But how to fix it?
0
Comment
Question by:jhully
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:vascov
ID: 9779828
Hi,

Have a look at this article, i believe it addresses your concern

Secure XSL Transformations in Microsoft .NET
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml07212003.asp

HTH
0
 
LVL 12

Accepted Solution

by:
vascov earned 250 total points
ID: 9797905
Did the article help ?

Need further assistance ?

HTH
0
 

Author Comment

by:jhully
ID: 9803714
Really, yes... But I am still trying to build some more usable and comortable interface. Could we continue after I'll send the points to you?
0
 
LVL 12

Expert Comment

by:vascov
ID: 9807453
Hi,

Of course we can, but if the question is answered it's fair to give me the points, right ? :)

Regards
0
 

Author Comment

by:jhully
ID: 9808746
You absolutely right
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question