[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using Transforms and #include file
I have a default.asp page on a web site that has the following: <script ID="clientEventHandlersJS" LANGUAGE="javascript"> <!--#include file="JScripts/Buttons.js"--> <!--#include file="JScripts/Tabs.js"--> <!--#include file="JScripts/Functions.js"--> </script> I am driving the content of this page by writing to ".innerHTML" of various tags on the page using XML/XSL. What I'd like to do is have my javascript included with the appropriate output instead of everything loading automatically when the default page loads. Is it possible to have something like the following output from XSL so that the actual script gets inserted? I was trying to avoid actually putting all of my script into the XSL file. XSL snippet <div> <xsl:attribute name="Id"> <xsl:value-of select="JSSource" /> </xsl:attribute> <script> <xsl:attribute name="Id"> <xsl:value-of select="clientEventHandlersJS" /> </xsl:attribute> <xsl:attribute name="Language"> <xsl:value-of select="javascript" /> </xsl:attribute> <xsl:copy-of select="document(<!--#include file="JScripts/Buttons.js"-->)" / > </script> </div> HTML output <div Id="JSSource"> <script Id="clientEventHandlersJS" Language="javascript"> function f1() { .... } function f2() { .... } </script> </div> Thanks in advance. Manny Hellstern XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|