Re: [xsl] html code generation & parameter between xslt and jscript

Subject: Re: [xsl] html code generation & parameter between xslt and jscript
From: Johnnie Fox <johnniefox@xxxxxxx>
Date: Mon, 28 Feb 2005 19:48:26 +0000
I have found this by myself, if it can help ...
<xsl:value-of select = "utils:col(., number($lg))" disable-output-escaping = "yes" />

the two things I needed was ~disable-output-escaping = "yes"~ and ~number($lg)~


Johnnie Fox a icrit:

Sorry again for my too long preceding message !
Could I have a response with this shorter one ?
I try for a long time to get this parameter in JScript, and I don't understand why the inserted code isn't interpreted as html

Johnnie Fox a icrit:

I would like to generate cells in a table depending on a variable in a xml tree.
I get two troubles :
get the number into the jscript procedure (I get a error, probably due to a format error ? )
the html generated code isn't interpreted (not the right moment to include that kind of code ?)
I'm newbe in xml/xslt using (it's probably visible :-) , thanks for your help

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"

<msxsl:script language="javascript" implements-prefix="utils"><![CDATA[
function col(context, lg ){
var nb = lg;
var i;
var s="";
for (i=0; i<nb; i++){
s += '<td><input type="text" size="1"/></td>';
return s;
<xsl:output method="html" indent="yes"/>
<xsl:template match="racine">
<p align="center">
<table border="1">
<xsl:template match="Horizontalement">
<xsl:template match="l">
<xsl:template match="m" >
<td> <input type="text" size="1"/> </td>
<xsl:variable name="lg" select="@long"/>
<xsl:copy-of select="utils:col(., $lg)" />

<xsl:template match="n">
<td bgcolor="black"/>

<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type="text/xsl" href="mcroisis.xsl"?>
<l name="1">
<m long="12">Cilhbre restaurateur de Saint-Germain-des-Prhs. </m>
<m long="7">Croquait le marmot ` Montmartre.</m>
<l name="2">
<m long="11">Imposer ses convictions.</m>
<m long="8">Alengon ou Orlians, Provence ou Artois.</m>
<l name="3">
<m long="4">Peut faire peur aux enfants. </m>
<m long="11">Un sacri caracthre. </m>
<m long="3">Un sacri raccourci. </m>
<l name="4">
<m long="6">Un endroit qui n'itait pas dans le vent.</m>
<m long="2">Poitiquement vert et bleu.</m>
<m long="5">Poitiquement tout blanc. </m>
<m long="2">Possessif.</m>
<m long="1"/>


Current Thread