SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2001
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating a Javascript code output from XSL

    Anyone knows how to deal with XSL/Javacsript. I tried to output javascript with XSL with no success.

    PHP Code:
    <?xml version='1.0' encoding='ISO-8859-1'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
    <xsl:output method="html"/> 
    <xsl:template match="/">

    <xsl:for-each select="Listings/Listing">

    <xsl:text>document.write('</xsl:text><a><xsl:attribute name="href"><xsl:value-of select="URL" /></xsl:attribute><font size="-1" face="Arial" color="#DF3716"><b><xsl:value-of select="Title" /></b></font></a><br /><xsl:text>');</xsl:text>

    </xsl:for-each>

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

    Thanks in advance.
    Last edited by d-net; May 27, 2002 at 12:00.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •