Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Reading Xslt file with include/import xsl files in the same document library

$
0
0

Hi,

          I am new to sharepoint dev. I am trying to read an XSLT file which has references via <import> tags to other XSLt files in the same document library . I am using c# Xmlresolver class to resolve the urls/references. The process seems to be looking for the refernced file in C:/windows/system32/inetserv/...which seems to be the default ASP.NET directory.. Here is the sample code.. Let me know if I am going the wrong way or If somebody has dealt with this before??Please help...THanks

Here is the sample code

SPFile aFile = oWebsite.GetFile(oFile.Url);

byte[] bytes = aFile.OpenBinary();

  

Streamsr = newMemoryStream(bytes);

                        XmlTextReader reader =

newXmlTextReader(sr);

                        XsltSettings xslt_settings =

newXsltSettings();

                        xslt_settings.EnableScript =

true;

                        XslCompiledTransform xslt =

newXslCompiledTransform();

                        xslt.Load(reader, xslt_settings,

newXmlUrlResolver());

 

                     

  xsltran.Load(reader);


 

 

                        Xml_ctrl.Transform = xsltran;



Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>