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

Re: CodeML?

  • From: Rick Jelliffe <ricko@a...>
  • To: xml-dev@l...
  • Date: Sun, 25 Feb 2001 14:27:13 +0800

codeml
From: robert sanford <rsanford@n...>

>is there a specification anywhere for creating an xml based
>programming language? the idea that i have in my head is that a
>language would be specified in a schema describing a BNF like
>structure and that potentially an XSLT could translate a "program"
>(aka instance document) written in that language to an actual
>implementation language such as perl, java, c++, etc.

See Gavin Nicol's XEXPR http://www.w3.org/TR/xexpr/ for a scripting language
using XML syntax (looks like a little LISP in XML).

I have implemented XML->C/Java transformations several times, e.g. the GLUE
transcoders (see http://www.ascc.net/xml/resource/glue we stopped this
project because we thought it undesirable to compete with Mark Davis'  ICU)
and I would not recommend XSLT as the transformation language: it is too
verbose and you have to make ugly code in order to get nice output.

If you did decide to go with XSLT, you would do well to first create a
special output handler for your target language, so that delimiting was
handled transparently. One inconvenience with XSLT for this use is the space
handling: it is difficult to have nicely indented XSLT code that does not
introduce unwnated whitespace in the output.   The bigger dificulty is the
gap in traceability from error messages from the target compiler to the XML
code: so you really want to make as much use of XML validators (DTDs, etc.,
Schematron http://www.ascc.net/xml/schematron ) as possible so that as many
errors are caught on the XML side as possible.

I found OmniMark (and I imaging Perl would be the same) to be much better
syntax for this than XSLT. XSLT's specification notes that it was not
designed as a general-purpose transformation language.

Cheers
Rick Jelliffe


  • Follow-Ups:

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.