Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-11-17
5
Medium Priority
?
222 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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
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
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month9 days, 4 hours left to enroll

877 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