|
|
| About site: Programming/Languages/Simkin - Simkin: A Scripting Language for XML |
Return to Computers also Computers |
| About site: http://www.developer.com/java/other/article.php/630111 |
Title: Programming/Languages/Simkin - Simkin: A Scripting Language for XML By Benoît Marchal. It mixes XML with a scripting language. Use it to create more flexible applications that can be reconfigured, or extended, via XML files. [Developer.com, Gamelan.com, EarthWeb] |
|
|
|
|
Sleepycat_Software,_Inc_ Builds, distributes, and supports The Berkeley Database, an open source embedded database system. Berkeley DB is a programmatic toolkit that provides high-performance built-in database support for bo
| National_Space_Science_Data_Center Provides access to a wide variety of astrophysics, space physics, solar physics, lunar and planetary data from NASA space flight missions, in addition to selected other data and some models and
| Pascal_Van_Hentenryck Brown University, US. Some constraint papers.
| Maxx_Download Freeware and Shareware archive with software titles grouped by categories. Accepts PAD submissions from authors.
| PDA_Medical_Solutions Offers reference guides including orthopedics, opthamology, infectious diseases, and surgical notes and wounds. Requires ISilo.
| Introduction_to_CSS_shorthand_properties By Ove A. Klykken. Examples of use and browser compatibility.
|
|
| Alexa statistic for http://www.developer.com/java/other/article.php/630111 |
Please visit: http://www.developer.com/java/other/article.php/630111
|
| Related sites for http://www.developer.com/java/other/article.php/630111 |
| ELSA_AG FTP mirror site (Technical University of Chemnitz) with drivers and software for products of the defunct vendor ELSA. | | CENA_Mirror This is a mirror of the Decwindows directory of the now closed down ftp-archive at ada.cenaath.cena.dgac.fr (banc.cenaath.cena.dgac.fr resp.). | | eSensual_Studios Webcam hardware reviews and tutorial. | | Termiit Termiit - A build management CASE tool for defining Java build processes by drawing easy understandable graphical diagrams. No Ant scripts or Makefiles needed. | | QuickSystems Freeware and commercial ActiveX components, tools. Visual Basic examples. Links. | | RFC_2321 RITA -- The Reliable Internetwork Troubleshooting Agent. A. Bressen. Apr-01-1998. | | Innovative_software_development_ iPOS Management Suite is not just an accounting software, its a management system for small to mid sized companies even with international locations. | | Medical_Eponyms Database with common and obscure eponyms. Requires either JFile or a document reader. | | Kb_Calendar_4_2 Professional public or private internet calendar web site plug-in. No HTML programming necessary. | | Manchester_Annual_Conference_on_Reconfigurable_Computing Was Technical Symposium, now is on Supercomputing, focus: tools and uses for high performance computing; 28-29 March 2007, University of Manchester, England. | | RFC_1660 Definitions of Managed Objects for Parallel-Printer-Like Hardware Devices using SMIv2. B. Stewart. July 1994. | | RFC_2848 The PINT Service Protocol: Extensions to SIP and SDP for IP Access to Telephone Call Services. S. Petrack, L. Conroy. June 2000. | | Allexperts_Javascript_Q&A Volunteers answer your detailed questions about JavaScript. | | WSN_Guest Fully templated PHP/MySQL guestbook which allows unlimited custom fields. [Free with crediting text in footer and outgoing emails or commercial] | | HWG_Filtering_FAQ_(Windows,_Mac,_Unix) The HTML Writers' Guild's FAQ sheet about mail filtering systems (multiple platforms) | | Center_for_Internet_Studies Center for Internet Studies at the University of Washington examines the relationship between the Internet and global society. The Center is an international resource for business, government, and aca | | Christoph_Buenger_Software Provides access to eBay on your TV using Microsoft's Windows XP Media Center. | | 89DollarWebsites_Com Offers web design, Flash animation, and search engine submission. | | AchTube Video sharing and broadcasting component for Joomla!. | | FrostWire A cross-platform, open source LimeWire PRO alternative, it supports Gnutella and Bittorrent protocols and is optimized to work behind firewalls. |
|
This is websites2007.org cache of m/ as retrieved on 2008.10.10 websites2007.org's cache is the snapshot that we took of the page as we crawled the web. The page may have changed since that time.
|
Simkin: A Scripting Language for XML
img { border: 0px;}
IT MANAGEMENT
CIO Update
Datamation
eCRMGuide
DRM Watch
eSecurity Planet
ITSMWatch
Intranet Journal
Inside ID
Grid Computing Planet
bITa Planet
IT Career Planet
Project Manager Planet
Semantic Web
NETWORKING
EnterpriseNetworkingPlanet
InstantMessagingPlanet
EnterpriseStorageForum
OpenNetworksToday
OpticallyNetworked
PracticallyNetworked
WEB DEVELOPMENT
HTML Goodies
Javascripts.com
HARDWARE & SYSTEMS
EarthWeb Hardware
SysOpt
Virtual Dr.
WorkstationPlanet
SOFTWARE DEVELOPMENT
CodeGuru
Developer
jGuru.com
JARS
Gamelan
EARTHWEBNEWS.COM
Business
Developer
Ecommerce
Enterprise
Networking
Security
Special Reports
Storage
Opinion
Mobility
xSP
Stats
IT MANAGEMENT
NETWORKING
WEB DEVELOPMENT
HARDWARE & SYSTEMS
SOFTWARE DEVELOPMENT
IT NEWS
Developer.com
Earthweb
CodeGuru
| Gamelan
| Jars
| Wireless
| Discussions
Architecture & Design
Database
Java
Languages
& Tools
Microsoft
& .NET
Open Source
Project Management
Security
Techniques
Voice
Web Services
Wireless/Mobile
XML
New
Videos
Technology Jobs
Developer.com Webcasts:
The Impact of Coding Standards and Code Reviews
Project Management for the Developer
Defining Your Own Software Development Methodology
more Webcasts...
Nominate the Best
Products or Technologies for Developer.com Product of the Year!
Be a Commerce Partner
It's Official: Windows 7 at PDC, WinHEC September 25, 2008Oracle Keeps Building on Spoils From BEA September 24, 2008Intel, Oracle Head For 'The Cloud' September 24, 2008Oracle Focuses on Grid, Developer Tools September 23, 2008
Developer.com Update
Codeguru.com Update
Jars.com Update
Gamelan.com Update
15Seconds HTML
4 Guys from Rolla
ASP Wire
ASP 101
Database Journal
DBASupport
Java Boutique JNews
VB Wire
WebDeveloper.com
WebReference HTML
Virtual Dr. Text
Enterprise Networking Planet
Simkin: A Scripting Language for XML
By Benoît Marchal
Go to page: 1 2 Next
It's fun to write for EarthWeb. Occasionally, I receive e-mail from developers pointing me to a new or interesting application. Recently, the creator of a new scripting language called Simkin asked me whether I'd like to examine his creation. Simkin is an intriguing idea that mixes XML with a scripting language. Scripts and XML There are already scripting languages for XML, most notably XSLT the transformation language developed by the W3C. What sets Simkin apart from other offerings is that it embeds scripts within an XML document. What for? I found that the mixture of XML tags and scripts is ideal as an intelligent configuration file format. In fact, that was the genesis of Simkin. Simon Whiteside, its developer, explains: "The language grew out of configuration files for an adventure game. The parameters in the file were getting so complicated, I started by adding an expression syntax and moved onto a fully blown language syntax." Simkin has also been used as an API for plug-ins. Sibelius, a music processor, is an example of the latter. As we will see, a Java developer can expose functions and variables to Simkin. Plug-in developers can call functions from Simkin. Your First Script Let's test the configuration capability of Simkin with a simple application to process text. Figure 1 is the application. The interface is simple: a text field and a button. A configuration file controls the size of the window, the title, and the button label, as well as (and this is the Simkin novelty) what happens when the user presses the button. All these parameters, including the script, are in an XML file. Figure 1. A scriptable window. Listing 1 is the Simkin script. The first four XML elements (<Title>, <Label>, <Width> and <Height>) control the appearance of the window as we described. The last one (<Action>) is a tiny script that gets executed when the user presses the button. <xmp><?xml version="1.0"?><Frame> <Title>Simkin Example for Gamelan</Title> <Label>Reverse</Label> <Width>330</Width> <Height>60</Height> <Action>() { input = reverse(input); } </Action></Frame></xmp> Listing 1: frame.xml. Note that, like XML, Simkin is extensible, and it does not enforce the element names. As you will see in the next section, it is up to the application programmer to decide on the structure of the XML document and on the scripts associated with it. You could even use Simkin in windowless applications. Linking the Script in Your Application Simkin comes with a simple API to embed scripts in any Java application. The API main class is XMLExecutable, from which your application will derive. Listing 2 is the Java code for the text manipulation application. import simkin.*;import java.io.*;import java.awt.*;import org.xml.sax.*;import org.w3c.dom.*;import java.awt.event.*;public class TextManipulator extends XMLExecutable implements ActionListener{ protected Frame frame; protected TextComponent input; public TextManipulator() throws SAXException, IOException { super(new File("frame.xml")); frame = new Frame(fromXML("Title")); int width = Integer.parseInt(fromXML("Width")), height = Integer.parseInt(fromXML("Height")); frame.setSize(width,height); frame.setResizable(false); input = new TextField(30); Button button = new Button(fromXML("Label")); frame.setLayout(new FlowLayout()); frame.add(input); frame.add(button); button.addActionListener(this); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); frame.show(); } public void actionPerformed(ActionEvent e) { try { method("Action",new RValueArray(),new RValue()); } catch(Exception x) { Tracer.trace(x); } } public void show() { frame.show(); } String fromXML(String fieldName) { Element child = XMLElementObject.findChild(getCode(),fieldName); if(child != null) return XMLElementObject.getData(child); else return new String(); } public boolean getValue(String name,RValue value) { if(name.equals("input")) { value.str(input.getText()); return true; } else return super.getValue(name,value); } public boolean setValue(String name,RValue value) { if(name.equals("input")) { input.setText(value.str()); return true; } else return super.getValue(name,value); } public boolean method(String name, RValueArray arguments, RValue result) throws ParseException, RuntimeException { if(name.equals("upper") && arguments != null) { result.str(arguments.at(0).str().toUpperCase()); return true; } if(name.equals("lower") && arguments != null) { result.str(arguments.at(0).str().toLowerCase()); return true; } if(name.equals("reverse") && arguments != null) { StringBuffer arg = new StringBuffer(arguments.at(0).str()); result.str(arg.reverse().toString()); return true; } else return super.method(name,arguments,result); } public final static void main(String[] args) throws SAXException, IOException { XMLExecutable.setInterpreter(new Interpreter()); TextManipulator tm = new TextManipulator(); tm.show(); }} Listing 2: TextManipulator.java.
Go to page: 1 2 Next
Tools:
function addFireFox() {
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
window.sidebar.addSearchEngine('http://www.developer.com/search/ffsearch.src', 'http://www.developer.com/search/ffsearch.png', 'Developer', 'Developer');
}
else {
alert(' x ');
}
}
function addIE() {
window.external.AddSearchProvider('/search/iesearch.xml');
}
Add www.developer.com to your favorites
|
|
| |
By | Benoît | Marchal. | It | mixes | XML | with | a | scripting | language. | Use | it | to | create | more | flexible | applications | that | can | be | reconfigured, | or | extended, | via | XML | files. | [Developer.com, | Gamelan.com, | EarthWeb] |
|
http://www.developer.com/java/other/article.php/630111
Simkin: A Scripting Language for XML 2008 October
dvd rental
dvd
By Benoît Marchal. It mixes XML with a scripting language. Use it to create more flexible applications that can be reconfigured, or extended, via XML files. [Developer.com, Gamelan.com, EarthWeb]
Rules
|
© 2008 Internet Explorer 5+ or Netscape 6+
|
|
Recommended Sites: 1.
Arts -
Business -
Computers -
Games -
Health -
Home -
Kids and Teens -
News -
Recreation -
Reference -
Regional -
Science -
Shopping -
Society -
Sports -
World
Miss Gallery
- Top Anime Hentai
- DVD rental by mail
- Actress - Mortgage Calculator - Loans - Credit Cards UK - MPAA
|