Here is an example of the start of an XML file we build, note that is is Accessing “CCD.xsl” for the style sheet.
'<?xml version="1.0"?>'
'<?xml-stylesheet type="text/xsl" href="' + 'C:\CDA\Schemas\CCD.xsl"?>'
'<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
Anytime this xml loaded into a TWebBrowser from a remote user accessing the server they get the following error
“Access is denied. Error processing resource ‘file:///C:/CDA/Schemas/CCD.xsl’.”
WebBrowser1.Navigate(TempFileName); //TempFileName = C:\data\CCR_Record_3336557.xml
Any Ideas on how this could be resolved?
If you need additional information let me know..
Thanks, appreciate the help.
You have two problems, both stemming from the fact that the XSL reference is to a local file on the C drive.
Problem #1 (the one giving you the error) is that your browser is blocking attempts to access local file system resources from a remotely-downloaded XML file. So the browser throws a security error when trying to render that XML file. That’s the immediate error you’re seeing. Adjusting security settings or changing browsers won’t solve your problem because of problem #2.
Problem #2 is that your client presumably doesn’t have an XSL file on their local hard drive at
C:\CDA\Schemas\CCD.xsl. It’s on the C drive of the remote server. You can’t just put it on a network share because of problem #1, so you’ll need to serve it through the same mechanism you serve the XML file. Then change your URI for the XSL file to something likehttp://myserver/schemas/ccd.xsl.