Solved

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

Posted on 2003-11-17
5
188 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now