tags:

views:

321

answers:

1

I am building a menu and have it set up so that I use a stadard <!--#include virtual = "myDoc.xml" --> SSI tag to include my xml document. The xml document includes the xsl document with <?xml-stylesheet type="text/xsl" href="myOtherDoc.xsl"?>. For some reason the xsl document is not working. The xml is being displayed as a blob.

Thanks

Bill

+1  A: 

Unfortunately your XSL transform won't work like that. You'd have to send the XML document alone to the browser where the built in xsl transformer would then reference the stylesheet and perform the transform.

What you've got is an HTML page already being rendered and you're including the XML as just a chunk of xml rendered into the output stream, but the browser won't know to transform it because it doesn't have the:

<?xml-stylesheet type="text/xsl" href="myOtherDoc.xsl"?>

...PI at the start of the page. Remember these are processed by the browser not the server.

You would need to transform the XML server side e.g.

<!-- #include virtual="doMenuXform.asp" -->

HTH
Kev

Kev