* (again) issue with lpath and conditional
@ 2018-03-21 19:29 Pablo Rodriguez
0 siblings, 0 replies; only message in thread
From: Pablo Rodriguez @ 2018-03-21 19:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear list,
I have the following sample:
\startbuffer[demo]
<doc>
<pre class="tex typeset fullwidth">
<code>
a
</code>
</pre>
<pre class="tex typeset">
<code>
b
</code>
</pre>
</doc>
\stopbuffer
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{doc}{xml:*}
\xmlsetsetup{\xmldocument}
{pre[contains(@class,'typeset')]/code}
{xml:pre:code}
\stopxmlsetups
\xmlregistersetup{xml:initialize}
\startxmlsetups xml:doc
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:pre:code
\xmlinfo{#1}
\xmlpath{#1}
\xmldoifelse{#1}{../pre[contains(@class,'fullwidth')]}
%~ \xmldoifelse{#1}{{pre[class*="fullwidth"]}}
{\startpar Full–width.\stoppar}
{\startpar Another width.\stoppar}
\stopxmlsetups
\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext
It is beyond my kmowledge why the lpath
"{../pre[contains(@class,'fullwidth')]}" doesn’t return true, when
\xmlinfo shows "[code]" and \xmlpath is "doc/pre/code" (indices aren’t
relevant here).
Neither does the css selector work.
What am I missing in the lpath and the css selector?
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] only message in thread
only message in thread, other threads:[~2018-03-21 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 19:29 (again) issue with lpath and conditional 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).