473,379 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

xml javascript lunghezza campo tabella

Salve!
Ho la necessitą di creare un documento xsl con una tabella che deve
avere i campi della stessa lunghezza del valore ottenuto da una
funzione javascript:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
<style>.fr {background-color:orange;}</style>
<style>.cella {font-family:Arial,sans-serif;
font-size:10pt;font-weight:100;text-align:left;text-transform:capitalize;color:white;}</style>
<style>.xy {background-color:#99FF66;}</style>
<style>.pr {background-color:yellow;}</style>
<style>.m {background-color:red;}</style>
<style>.mr {background-color:#FFFFCC;}</style>
<xsl:for-each select="rows/row">
<table border="0">
<TR>
<TD class="fr">
<xsl:attribute name="width">
<xsl:value-of select="gradi"/>
</xsl:attribute>
</TD>

Come faccio ad inserire la funzione JS per impostare il width del td??
Grazie
Jul 20 '05 #1
1 1905
> Salve!
Ho la necessitą di creare un documento xsl con una tabella che deve
avere i campi della stessa lunghezza del valore ottenuto da una
funzione javascript:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
<style>.fr {background-color:orange;}</style>
<style>.cella {font-family:Arial,sans-serif;
font-size:10pt;font-weight:100;text-align:left;text-transform:capitalize;color:white;}</style>
<style>.xy {background-color:#99FF66;}</style>
<style>.pr {background-color:yellow;}</style>
<style>.m {background-color:red;}</style>
<style>.mr {background-color:#FFFFCC;}</style>
<xsl:for-each select="rows/row">
<table border="0">
<TR>
<TD class="fr">
<xsl:attribute name="width">
<xsl:value-of select="gradi"/>
</xsl:attribute>
</TD>

Come faccio ad inserire la funzione JS per impostare il width del td??
Grazie

Hi,

Not that I know any Italian, but I think I understood your question.

I could be totally wrong, but here I go:
In the deprecated XSLT 1.1 working draft, there were plans to implement an element 'script' to allow extension function via scripts. It would look like this:

<xsl:script implements-prefix="my-exstensions" language="javascript">
function calcWidth() {

}
</xsl:script>

That script would then be called with this:
<xsl:value-of select="my-exstensions:calcWidth()"/>

You might be using a transformation engine like Xalan that supports this non-existing XSLT 1.1
But I think XSLT 2.0 will allow it somehow eventually.
But as a general remark, I don't see why you should manually calculate the width of any table, as browsers can do that themselves.

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Ceterum censeo XML omnibus esse utendum
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: STB | last post by:
ciao a tutti... ci risono... devo migliorare delle performance di accesso ad una tabella... la tabella non ha indice primario, ne altri indici... sulla tabella ci accedo con select di questo...
1
by: Davide | last post by:
Perche' non riesco ad inserire immagini opiu' grandi di 1Mb in un campo LONGBLOB? Ha forse il limite di 1Mb il campo LONGBLOB? Se si, posso modificare tale limite? Per le immagini inferiori a...
5
by: Gema | last post by:
Hola a todos, Tengo un problema, no se me ocurre como solucionarlo. Utilizo SQL Server 2000. Tengo una tabla (tblRespu) en la que quiero insertar tres valores: el primero procede de una...
0
by: | last post by:
Ho notato che se lascio un text box vuoto ottengo un errore in fase inserimento valori in una tabella (INSERT INTO) string IDAzienda = CodiceIns.Text; string Ragione = RagioneIns.Text; ...
1
by: charales | last post by:
Hi everyone! I'm having this problems with javascript. If you go to: http://www.nikonistas.com/es_home/nikon2.html you'll find at the top-left corner the typical username-password form with the...
2
by: Adriano | last post by:
Dear all, Is it possible to insert a new javascript tag through the innerHTML (and use it of course)? In the following example, the click on a button, insert in a div a string (TESTO)...
6
by: viki1967 | last post by:
Hi everyone. I have this web page: <html> <head> <SCRIPT>
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.