ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Procházka Lukáš Ing. - Pontex s. r. o." <LPr@pontex.cz>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: XML - accessing parental children attribute (was: some troubles)
Date: Wed, 18 Feb 2015 08:31:00 +0100	[thread overview]
Message-ID: <op.xt8shyy3tpjj8f@lpr> (raw)
In-Reply-To: <54E39CED.4040908@wxs.nl>

Hello,

thanks Hans, this works perfectly...

Lukas


> \startbuffer[demo]
> <a>
>    <aa number="--">--</aa>
>    <aa number="a1">A1</aa>
>    <ax number="x1">X1</ab>
>    <ab number="b1">B1</ab>
>    <aa number="--">--</aa>
>    <aa number="a2">A2</aa>
>    <ax number="x2">X2</ab>
>    <ab number="b2">B2</ab>
>    <aa number="--">--</aa>
>    <aa number="a3">A3</aa>
>    <ax number="x3">X3</ab>
>    <ab number="b3">B3</ab>
> </a>
> \stopbuffer
>
> \startxmlsetups xml:initialize
>      \xmlsetsetup{#1}{*}{xml:*}
> \stopxmlsetups
>
> \startxmlsetups xml:a
>      \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:aa
>      \par
>      <aa>\xmlflush{#1}</aa>
>      \par
> \stopxmlsetups
>
> \startxmlsetups xml:ax
>      \par
>      <ax>\xmlflush{#1}</ax>
>      \par
> \stopxmlsetups
>
> \startxmlsetups xml:ab
>      \par
>      <ab>
>      \xmlflush{#1}:\space
>      aa: \xmlfilter{#1}{reverse-sibling::[tag() ==
> 'aa']/attribute('number')}\space
>      ax: \xmlfilter{#1}{reverse-sibling::[tag() ==
> 'ax']/attribute('number')}\space
>      </ab>
>      \par
> \stopxmlsetups
>
> \xmlregistersetup{xml:initialize}
>
> \starttext
>    \xmlprocessbuffer{main}{demo}{}
> \stoptext


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___________________________________________________________________________________
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-02-18  7:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 14:25 Procházka Lukáš Ing. - Pontex s. r. o.
2015-02-17 19:56 ` Hans Hagen
2015-02-18  7:31   ` Procházka Lukáš Ing. - Pontex s. r. o. [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=op.xt8shyy3tpjj8f@lpr \
    --to=lpr@pontex.cz \
    --cc=ntg-context@ntg.nl \
    /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).