Hi all,

First of all a big thank you to Hans for MkIV xml support which is so much easier to understand than the MKII based method (or is that just me?) Anyway, I'm processing a rather messy html file and I would like to do some conditional processing based on the actual content of the element. See example below: I have linked <h3> with \subject but I would like to drop this element if the content of the element matches 'Skip title'.
Any hints? Thanks!

<h3>Title 1</h3>
<p>Hello world.</p>
<h3>Skip title</h3>
<p>Hello world!</p>
<h3>Title 2</h3>
<p>Hello world?</p>
<h3>Title 3</h3>
<p>Hello :-)</p>

\startxmlsetups xml:setups


\startxmlsetups xml:html

\startxmlsetups xml:h3
\subject{\xmlflush{#1}} % but drop this if content of element is 'Skip Title'

\startxmlsetups xml:p


Expected outcome:
  Title 1
  Hello world.
  Hello world!
  Title 2
  Hello world?
  Title 3
  Hello :-)
If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net

Reply via email to