[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- From: Rick Jelliffe <email@example.com>
- To: firstname.lastname@example.org
- Date: Sun, 25 Feb 2001 14:27:13 +0800
From: robert sanford <email@example.com>
>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.
- Re: CodeML?
- From: Richard Lanyon <firstname.lastname@example.org>