View Single Post
  #4 (permalink)  
Old November 2nd, 2006, 12:32 PM
mxxz mxxz is offline
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

I have tried this code sample and still have the same problem where the parameters are not appearing. Please help. I hard coded the parameter values in the HTML page and transforming in the HTML page. I think this is what you were saying in the answer. If you have a sample code I can try please advice.

<?xml version="1.0" encoding="ISO-8859-1"?>
    <title>Empire Burlesque</title>
    <artist>Bob Dylan</artist>
    <title>zEmpire Burlesque</title>
    <artist>zBob Dylan</artist>



?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl=""><xsl:template match="/">
<xsl:param name="genre"/>
<xsl:param name="prodName"/>
    <h2>My CD Collection</h2>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th align="left">Title</th>
        <th align="left">Artist</th>
      <xsl:for-each select="catalog/cd">
        <td><xsl:value-of select="title" /></td>
        <td><xsl:value-of select="artist" /></td>

  <table border="1">
      <tr bgcolor="#9acd32">
      <th align="left">Var</th>
              <xsl:value-of select="$genre"/>


  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="author" content="Unregistered User">
  <meta name="generator" content="AceHTML Freeware">

<script language="javascript">
function loadData()

// Load XML
var xml = new ActiveXObject("MSXML2.DomDocument.3.0");
xml.async = false
xml.load("C:/Projects/Traders portal/test3.xml")

// Load the XSL
var xsl = new ActiveXObject("MSXML2.FreeThreadedDomDocument.3.0" );
xsl.async = false
xsl.load("C:/Projects/Traders portal/test3.xsl")

// Transform
var template = new ActiveXObject("MSXML2.XSLTemplate")
  template.stylesheet = xsl
  processor = template.createProcessor()

  processor.input = xml

  processor.addParameter("genre", 'Jazz')
  processor.addParameter("prodName", 'FRA')

 <body id='updateTarget' onLoad="javascript:loadData()">


Reply With Quote