xsl-list
[Top] [All Lists]

RE: output html source

2003-07-10 01:23:11
-----Original Message-----
From: Keith Anderson [mailto:roobarb(_at_)fastmail(_dot_)fm]
Sent: 10 July 2003 08:53
Subject: [xsl] output html source
I have some xsl that generates html output using the user's
browser. Is there a technique for tweaking the xsl so it
outputs the html source ? Then I could for example easily
show the source in one html frame and the rendered page in
another. I'm not in a position to use server-side facilities
like a standlone xsl processor. Thanks in advance for any
help.

you could do something like the following;

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:msxsl="urn:schemas-microsoft-com:xslt"

        <xsl:output method = "xml" encoding="utf-8" />
        
        <xsl:template match="/">
        <xsl:variable name="holdresult">        
                <html>
                <head>
                        <title>test</title>
                </head>
                        <body>test</body>
                </html>
        </xsl:variable>
        
        <xsl:copy-of select="$holdresult)"/>

        </xsl:template>
        
</xsl:stylesheet>

depending on how you want to see the source, u could use ms scripting or 
reapply $holdresult ( remember to use node-set e.g. in IE <xsl:apply-templates 
select="msxsl:node-set($holdresult)"/> ) to a series of more templates.

gl, jim fuller
This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you are not the intended recipient please contact the sender immediately. Any 
disclosure, copying, distribution or any other use of this communication is 
strictly prohibitedand may be unlawful. Stuart Lawrence Marketing 
Communications Limited reserves the right to monitor and intercept 
communications for unlawful business purposes.

This also confirms that this message has been swept for viruses, although 
Stuart Lawrence Marketing Communications Limited accepts no responsibility for 
any loss or damage resulting directly or indirectly from the use of this email 
or contents.

----------------------------------------------------
Digital Camera http://www.jessops.co.uk
Conservatory http://www.ultraframe-conservatories.com
Care Homes http://www.fshc.co.uk


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>