G
George Kustas
I am using the Xml Web control to transform an XML string insto a
readable HTML display on the page:
Xml1.DocumentContent = <XML string from my database>
Xml1.TransformSource = "./transform.xslt";
XslTransform xt = Xml1.Transform;
It works, but the css stylesheet that I'm linking to in the xslt is
ignored if I use a relative path:
<LINK REL="stylesheet" HREF="StyleSheet1.css" TYPE="text/css"/>
If I use the fully qualified path, it works:
<LINK REL="stylesheet"
HREF="http://localhost/myWebApp/StyleSheet1.css" TYPE="text/css"/>
Funny thing is, though, If I get the XML from a file using the
DocumentSource property (vs DocumentContent), it works using the
relative path!
I can solve the problem by "hardcoding" the path using the likely URL,
but I hate to have to do this. Especially since it would require that
the virtual directory is always named the same thing.
readable HTML display on the page:
Xml1.DocumentContent = <XML string from my database>
Xml1.TransformSource = "./transform.xslt";
XslTransform xt = Xml1.Transform;
It works, but the css stylesheet that I'm linking to in the xslt is
ignored if I use a relative path:
<LINK REL="stylesheet" HREF="StyleSheet1.css" TYPE="text/css"/>
If I use the fully qualified path, it works:
<LINK REL="stylesheet"
HREF="http://localhost/myWebApp/StyleSheet1.css" TYPE="text/css"/>
Funny thing is, though, If I get the XML from a file using the
DocumentSource property (vs DocumentContent), it works using the
relative path!
I can solve the problem by "hardcoding" the path using the likely URL,
but I hate to have to do this. Especially since it would require that
the virtual directory is always named the same thing.