G
Gideon de Swardt
I am trying to do a server side transformation using an xsl:include in my
xslt stylesheet. The include stylesheet is stored /Library/abo.Library.xslt
and is included in multiple xslts, one example would be
/Valuation/ValuationSelect.xslt which is also used on the client side via
JavaScript and MSXML2.FreeThreadedDOMDocument.4.0. Client side the include
and transformation without any problems but it is when I am trying to do the
transformation on the server that I do get a XsltCompileException and
IOException error "the network path was not found". Worth mentioning also is
that the Library is a virtual folder in IIS, although I would have thought
that the XmlUrlResolver would resolve this problem for me it does not look
like it.
Here is the header of my xslt
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="/Library/abo.Library.xslt"/>
.....
</xsl:stylesheet>
and my C# code snippet for the transformation
XslTransform transform = new XslTransform();
XmlUrlResolver resolver = new XmlUrlResolver();
resolver.Credentials = System.Net.CredentialCache.DefaultCredentials;
transform.Load(Server.MapPath("/Organization/OrganizationSearch.xslt"),
resolver);
Any ideas will be much appreciated
Gideon de Swardt
xslt stylesheet. The include stylesheet is stored /Library/abo.Library.xslt
and is included in multiple xslts, one example would be
/Valuation/ValuationSelect.xslt which is also used on the client side via
JavaScript and MSXML2.FreeThreadedDOMDocument.4.0. Client side the include
and transformation without any problems but it is when I am trying to do the
transformation on the server that I do get a XsltCompileException and
IOException error "the network path was not found". Worth mentioning also is
that the Library is a virtual folder in IIS, although I would have thought
that the XmlUrlResolver would resolve this problem for me it does not look
like it.
Here is the header of my xslt
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="/Library/abo.Library.xslt"/>
.....
</xsl:stylesheet>
and my C# code snippet for the transformation
XslTransform transform = new XslTransform();
XmlUrlResolver resolver = new XmlUrlResolver();
resolver.Credentials = System.Net.CredentialCache.DefaultCredentials;
transform.Load(Server.MapPath("/Organization/OrganizationSearch.xslt"),
resolver);
Any ideas will be much appreciated
Gideon de Swardt