ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xml in lua advice ?
@ 2018-09-19 12:50 Taco Hoekwater
  2018-09-19 13:56 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2018-09-19 12:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

Is there a more elegant way to feed an xml tree into a context() command
that what I have below?


\startluacode
function xml.functions.heading(t)
   context.section("{")
   lxml.flush(t)
   context("}")
end
\stopluacode

The subtree in ’t’ could have embedded xml tags that should be processed, 
so just stripping it clean will not do.

(this is not about \section as such, I just needed an example. \startsection
would be more modern, but it would not help fix the issue )

Thanks for any help,

Taco




___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-19 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19 12:50 xml in lua advice ? Taco Hoekwater
2018-09-19 13:56 ` Hans Hagen
2018-09-19 14:21   ` mf
2018-09-19 14:43   ` Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).