ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* conditional not working in \setuphead
@ 2020-04-20 16:55 Pablo Rodriguez
  2020-04-20 17:23 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2020-04-20 16:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

  \startbuffer[demo]
  <doc>
    <section id="section-i1">
      <text>first</text>
    </section>
    <section id="section-i2">
      <text>second</text>
    </section>

  </doc>
  \stopbuffer

  \startxmlsetups xml:initialize
     \xmlsetsetup{#1}{doc|section}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

  \startxmlsetups xml:doc
     \xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xml:section
     \startsection[title={\xmlatt{#1}{id}},
        beforesection={\doif{\xmlatt{#1}{id}}{\selectedtopic}
            {conditional}}]
        \xmlflush{#1}
        \doif{\xmlatt{#1}{id}}{\selectedtopic}{conditional}
     \stopsection
  \stopxmlsetups

  \def\selectedtopic{section-i1}

  \starttext
     \xmlprocessbuffer{main}{demo}{}
  \stoptext

How can I make the conditional in the beforesection option work?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2020-04-20 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 16:55 conditional not working in \setuphead Pablo Rodriguez
2020-04-20 17:23 ` Wolfgang Schuster
2020-04-20 18:40   ` Pablo Rodriguez

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).