xsl-list
[Top] [All Lists]

Re: XSL-List Digest V4 #1469

2003-07-10 09:51:33
Date: Thu, 10 Jul 2003 09:23:11 +0100
From: "Jim Fuller" <jim(_dot_)fuller(_at_)stuartlawrence(_dot_)com>
Subject: RE: [xsl] output html source

-----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 ?

...

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.

Thanks for this suggestion Jim. Unfortunately I don't think
node-set() is guaranteed to be available in my users'
browsers, so I can't see how to use $holdresult . Perhaps
I'm asking for something that's not possible on my somewhat
restricted platform.

...
-- 
Keith Anderson (digested)

-- 
http://www.fastmail.fm - And now for something completely different?

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



<Prev in Thread] Current Thread [Next in Thread>
  • Re: XSL-List Digest V4 #1469, Keith Anderson <=