[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] announcement: xml, xsl and schema to represent javscript subset
Subject: [xsl] announcement: xml, xsl and schema to represent javscript subset From: "Armand Datema" <armand.datema@xxxxxxxxxxxxxxx> Date: Mon, 11 Aug 2003 10:48:12 +0200 |
Hi all We are about to release an xml xsl javascript package to generate javascript function calls object calls and global vars with javascript. Its almost done but I would like to get some comments/enhancement ideas on it before we release. Will work in ie and mozilla. This will make it very easy to generate dynamic menus, sites etc all javascript dhtml based because you can code everything in external js files and then generate the xml for the function calls objects and global vars as generated xml by php, asp, asp net or sqlxml. This xml: --------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="js-subset-representation.xslt"?> <script-subset-representation version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="js-subset-representation.xsd"> <vars> <var name="var1" assign-value="value1" type="string" comment="comment for var1"/> <var name="var2" assign-value="123" type="number"/> <var name="var3" assign-value="<span style=\"font weight:bold\">bold text</span>" type="markup" comment="note how quotes are properly escaped for javascript by writing them in XML as \&quot; Note that this message only appears correctly in the result of the transformation"/> <var name="var4" assign-value="value4" type="string"/> <var name="var5" declaration="true"/> </vars> <function-calls> <function-call name="alert" object-name="window" comment="this is an object function (method) call "> <param index="0" type="js" value="var3"/> </function-call> <function-call name="alert"> <param index="0" value="it works!" type="string"/> </function-call> </function-calls> </script-subset-representation> ---------------------------------------------------- creates the following javascript ---------------------------- <SCRIPT type=text/javascript> //=================================================================== // global variables //=================================================================== // comment for var1 var1 = "value1"; var2 = 123; // note how quotes are properly escaped for javascript by writing them in XML as \" Note that this message only appears correctly in the result of the transformation var3 = "<span style=\"font weight:bold\">bold text</span>"; var4 = "value4"; var var5; //=================================================================== // global function calls //=================================================================== alert("it works!"); //=================================================================== // object function calls (methods) //=================================================================== // this is an object function (method) call window.alert(var3); </SCRIPT> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using URL parameters in X, Julian Wood | Thread | [xsl] Problem making a transformati, Miguel Carvalho |
RE: [xsl] Using URL parameters in X, Michael Kay | Date | [xsl] Problem making a transformati, Miguel Carvalho |
Month |
Keywords