Bertrand Delacretaz wrote:
Le Mercredi, 2 avr 2003, à 20:25 Europe/Zurich, Stefano Mazzocchi a écrit :
<snips cause="commenting on some specifics only"/>
...IMHO, the template language which is closer to the optimum is XSLT
but only with one change:
FORGET THE XML SYNTAX!
Imagine using YAML (with a YAML to XML converter), or anything else
you may want.
BTW, My Binary XML project (http://d-haven.org/bxml) has the ability
to compile an XML document into a Java Class (I know this is nothing
extraordinary as XSP has been doing it for years). However what is
very different from XSP is the following:
1) No Java file is ever written (it uses BCEL)
2) No Class file *needs* to be written (although it is an option)
3) The original document name and the line numbers are part of the
generated source code.
* That means the Stack trace has debug information you can
use.
As long as your solution can be translated into an InputSource that
interprets your solution as a SAX stream, the BCEL compiler will still
work with it.
There is still alot to do with the project, and on the TODO list is:
* Enable callbacks
- I am still struggling with how to recognize them in the source
document.
- Trying to decide if I want to limit its support as an XInclude
only approach, or more generic.
* Finish the XMLRepository
- Uses weak references, so garbage collection is friendly
- Need to add support for monitoring the source file as an option;
that way the XMLRepository can update the class file behind the
scenes.
* Make the compiler extendable so that things like XSP can be included
seamlessly.
There are a few good points about Binary XML as it stands right now:
Every XML document is defined as an org.xml.sax.XMLReader so it will
incorporate itself seamlessly with any XML enabled application (Cocoon
included). It is not dependant on any outside library with the one
obvious exception of BCEL.