[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

announcement: xml, xsl and schema to represent javscri

Subject: announcement: xml, xsl and schema to represent javscript subset
From: "Armand Datema" <armand.datema@xxxxxxxxxxxxxxx>
Date: Mon, 11 Aug 2003 10:48:12 +0200
javascript global vars
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="&lt;span style=\&quot;font
weight:bold\&quot;&gt;bold text&lt;/span&gt;" type="markup"
comment="note how quotes are properly escaped for javascript by writing
them in XML as \&amp;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 \&quot; 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.