On Feb 17, 2009, at 11:07 PM, luigi scarso wrote:
(sorry x my laziness)
If I have a good xml , then mkiv is a good choice. As far I know, mkiv
~ xslt by lpeg, so
"traditional"
xml--( xslt )-->tex--( mkiv )-->pdf
is like
xml-->( mkiv )-->pdf
Note that in the last chain one mixes xml+tex: if xml become complex,
this can end in a messy situation.
Yes, you're right of course. I have a similar situation here: the xml
produced by ooo is too messy, so I want to preprocess it to something
that is easier to maintain and modify (e.g., I will, at some point,
add index entries and a TOC); that's why I use xslt here. But I still
produce xml which I process with mkiv.
But some documents need heavy preprocessing:
for example, I have one that come from java classes serialization,
and I need the power of python (lxml) to do a clean work .
Also, if xml changes , I 've found that lxml is more flexible than
xslt.
In this case I have
xml--( lxml )-->tex--( mkiv )-->pdf
The fact is that python and lua are not so differents,
so I've to manage two languages
(python+lua) and tex;
with 'traditional' workflow you have to manage 3 languages
xslt,lua and tex
and subdivide responsability is not so easy as the former .
Interesting. I have tried to play around with python-lxml, but am
having some problems to understand it. Just to give me an idea: how
would you transform this:
<text:span text:style-name="T3">foo</text:span>
to this
<emph>foo</emph>
with lxml? lxml seems to object to the ":" in the tag, even though
it's declared in the document.
Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________