he lua side, because there the
> attributes are just in a table entry of the argument node t ( t.at ):
>
> set up a lua function in the setups:
>
> \startxmlsetups xml:demo:base
> \xmlsetsetup{#1}{*}{xml:demo:*}
> \xmlsetfunction {\xmldocument}{entry}{userdata.xmlfunctions.entry}
> \stopxm
bles in this way, that would also be great!)
Not CALS, but I do a lot of HTML table processing. I find it all much easier on
the lua side, because there the
attributes are just in a table entry of the argument node t ( t.at ):
set up a lua function in the setups:
\startxmlsetups
nd
function xml.functions.b(t)
context.start()
context.bf()
lxml.flush(t)
context.stop()
context("{}")
end
function xml.functions.section(t)
context.section("{")
lxml.flush(t)
context("}")
end
\stopluacode
\startxmlsetups mysetups % to
which displays fine in my
browser, and it should look similar with ConTeXt.
I have problems with literal typesetting of (that
should have applied style instead), but maybe I only have wrong
settings in my parser.
When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I
cannot color
should look similar with ConTeXt.
I have problems with literal typesetting of (that
should have applied style instead), but maybe I only have wrong
settings in my parser.
When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I
cannot color the numbers. When I use, according to
aiks in docbook they embed the cals
model, so it's not used as an independent definition).
When in x-cals.lua the following is used in line 128
local prefix = namespace and namespace ~= "" and (namespace .. ":")
or ""
one can do this then:
\startxmlset
rted with the idea. You don't need
any regular expressions.
You can anly compile it with "texexec --lua filename.tex".
Mojca
\startxmlsetups all:html
\xmlsetsetup{main}{head|h1|h2|p|span|sub|table|b|tt|ul|li|div|img}{*}
%\xmlsetfunction{main}{pre}{lxml.displayverbatim}
to remove unneeded space? With \ignorespaces?
- How to use the new verbatim code? I have tried to use
\xmlsetfunction{main}{pre}{lxml.verbatim}
but it didn't really work.
% test.tex:
\startxmlsetups all:html
\xmlsetsetup{main}{h1|pre}{*}
\stopxmlsetups
\xmlregistersetup{all:html}