V
Volker Birk
Hi,
because I think, that XSLT is convenient, but it's somewhat unexpedient
to program XSLT directly, I thought about a more plain solution: YML -
translating a Python- or C-like language into YML.
With YML you'll in particular get the features, which make those things
more easy, which are annoying writing XSLT. ;-)
Because everything is being translated into XSLT, you can use YML or
YSLT, respectively, anywhere, where "pure" XSLT or XML is being used
now.
This is a hello world in YSLT:
----------------------- schnipp ----------------------------------------
include yslt.yml
stylesheet {
output "text"
template("/") {
}
----------------------- schnapp ----------------------------------------
If you're interested in a somewhat more complicated sample, see this
one for (simplyfied) generating Java interfaces out of XMI using YSLT:
<http://fdik.org/yml/xmi2JavaInterface.ysl>
The documentation you'll find on YML homepage here:
<http://fdik.org/yml/>
For having fun, I hacked a "Default Compiler", which generates a default
Y language out of an XML schema. From this tool I got ~99% of YHTML.
So the documentation is in YHTML ;-) <http://fdik.org/yml/index.yhtml>
I'm open for creative hints how to improve that, preferably in
de.comp.text.xml.
BTW: YML tool chain is being used in production in our company for some
time now, so it's a pretty square deal already ;-)
<http://www.logix-tt.com/divisions/software.shtml>
You can download a POSIX distribution under GNU GPL 2.0 here:
<http://fdik.org/yml/yml.tar.bz2>
YML can easily be used on Windows, too. You'll need Python, xsltproc and
XMLStarlet.
F'up2dctx
Yours,
VB.
because I think, that XSLT is convenient, but it's somewhat unexpedient
to program XSLT directly, I thought about a more plain solution: YML -
translating a Python- or C-like language into YML.
With YML you'll in particular get the features, which make those things
more easy, which are annoying writing XSLT. ;-)
Because everything is being translated into XSLT, you can use YML or
YSLT, respectively, anywhere, where "pure" XSLT or XML is being used
now.
This is a hello world in YSLT:
----------------------- schnipp ----------------------------------------
include yslt.yml
stylesheet {
output "text"
template("/") {
}> hello, world\n
}
----------------------- schnapp ----------------------------------------
If you're interested in a somewhat more complicated sample, see this
one for (simplyfied) generating Java interfaces out of XMI using YSLT:
<http://fdik.org/yml/xmi2JavaInterface.ysl>
The documentation you'll find on YML homepage here:
<http://fdik.org/yml/>
For having fun, I hacked a "Default Compiler", which generates a default
Y language out of an XML schema. From this tool I got ~99% of YHTML.
So the documentation is in YHTML ;-) <http://fdik.org/yml/index.yhtml>
I'm open for creative hints how to improve that, preferably in
de.comp.text.xml.
BTW: YML tool chain is being used in production in our company for some
time now, so it's a pretty square deal already ;-)
<http://www.logix-tt.com/divisions/software.shtml>
You can download a POSIX distribution under GNU GPL 2.0 here:
<http://fdik.org/yml/yml.tar.bz2>
YML can easily be used on Windows, too. You'll need Python, xsltproc and
XMLStarlet.
F'up2dctx
Yours,
VB.