[NTG-context] redefining xmlsetups inside a XML document
mf
massifr at fastwebnet.it
Thu Mar 10 16:59:25 CET 2022
Hello,
I'm trying to add new templates (xmlsetups) from the XML document itself.
See the attached MWE.
- the XML document is a simple XHTML file
- in the "head" element there's a "script" element with the "type"
attribute set to "text/vnd.context", whose contents are then passed to
\xmlcontext
- the "body" element has a "data-xmlsetups" attribute whose value should
tell which xmlsetups is to be applied on the body contents (it's defined
in the "script" element above)
If it worked, the resulting PDF should show the body element, followed
by a "Hello world!" paragraph written in red.
But it does not work, because there's something I'm missing in the
redefinition and application of xmlsetups.
To try the MWE, type:
context --environment=nested-xmlsetup.tex --forcexml nested-xmlsetup.xhtml
Massi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nested-xmlsetup.tex
Type: text/x-tex
Size: 1021 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220310/4e6f4466/attachment.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nested-xmlsetup.xhtml
Type: application/xhtml+xml
Size: 339 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220310/4e6f4466/attachment.xhtml>
More information about the ntg-context
mailing list