logo       

Implementing JavaScript: msg#01437

Subject: Implementing JavaScript
Hi,

I'm having problems implementing JavaScript in my XSL files. Here the code.

XSL-File hello.xsl:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"; xmlns:fo="
http://www.w3.org/1999/XSL/Format";>

<xsl:template match="/hallo">

<html>

<head>
<title>
<xsl:value-of select="@title"></xsl:value-of></title>
</head>

<body>

<select name="D1" size="1">
  <script language="JavaCcript">
    <!--
    mon=new Array
("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEPT","OKT","NOV","DEZ")
    heute= new Date()
    datstring =(heute.getDate()<10)?"0"+heute.getDate():heute.getDate
().toString()+"-"+mon[heute.getMonth()]+"-"+heute.getFullYear()
    document.write("<option>" + datstring + "</option>")
    //-->
  </script>
</select>
</body>
</html>


</xsl:template>


</xsl:stylesheet>


XML-File hello.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="hello1.xsl" type="text/xsl"?>
<hallo title="Hallo">
</hallo>


This should put the current date in a select box. Works fine in html, but
not in xml.

What is wrong with my code? Does anyone know a tutorial or whatsoever on
the topic: Javascript in xsl/xml. Haven't really found anything on the net.


Thanks
Jonny


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




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
region.costa-ri...    user-groups.lin...    lang.prothon.us...    xfree86.cvs/200...    finance.aqbanki...    ietf.smtp/1993-...    web.turbogears....    jakarta.cactus....    yellowdog.gener...    php.gtk+.genera...    org.region.indo...    hurd.l4/2005-10...    culture.religio...    apple.fink.gene...    db.mysql.window...    bluez.devel/200...    security.pgp-ba...    video.blender.d...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe