ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: Xan <xancorreu@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Refering to parent in XML
Date: Thu, 27 Aug 2015 20:43:54 +0200	[thread overview]
Message-ID: <55DF5A6A.6070808@wxs.nl> (raw)
In-Reply-To: <20150827110037.d724f87da39b451c4a491e94@gmail.com>

On 8/27/2015 11:00 AM, Xan wrote:
>> in a setup you can say: \xmlshow{#1} to see what is the (current) node
>
> It does not help me.
>
> I ask you in other way: if I have this
>
> % Presentació: defineix \Presentacio{activitat-id}{presentacio-id}
> \def\Presentacio#1#2%
>    {\xmlfilter{rebost}
>      {/activitats/activitat[@id=='#1']/presentacio[@tipus=='#2']/command(xml:display)}
>    }
>
> % Si la presentació és de tipus tradicional, aleshores és un 'exercici'. Altrament és una activitat.
> \startxmlsetups xml:display
>    \startitem[\xmlatt{..}{id}]
>      \xmlflushcontext{#1}
>    \stopexercici
> \stopxmlsetups
>
> gives me nothing in the label of startitem:
>    \startitem[]
>      contents....
>    \stopexercici
>
>   when I run \Presentacio{foo}{bar} and it *should* give me
>
>    \startitem[foo]
>      \xmlflushcontext{#1}
>    \stopexercici
>
>
> It seems like when I descend to activitat/presentacio then I can't go up.

if you use commands that accept a path you can backtrack, like

\xmlall{#1}{../../*}


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2015-08-27 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 18:18 Xan
2015-08-26  7:18 ` Hans Hagen
2015-08-27  9:00 ` Xan
2015-08-27 18:43   ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55DF5A6A.6070808@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    --cc=xancorreu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).