From: Hans Hagen <pragma@wxs.nl>
Subject: Re: XML-lookahead
Date: Sun, 27 Aug 2006 20:00:36 +0200 [thread overview]
Message-ID: <44F1DDC4.8010105@wxs.nl> (raw)
In-Reply-To: <67C6883C-2DCA-4D9B-BC0B-23F23F6EF7D6@gmail.com>
Sjoerd Siebinga wrote:
> Thanks Hans, for the fast response.
> On 27-aug-2006, at 14:56, Hans Hagen wrote:
>
>> \disablemode[xml:linebreak]
>>
>>
>> \startsetups[xml:linebreak]
>>
>> � \doifmode{xml:linebreak}{\disablemode[xml:linebreak]\crlf} �
>>
>> \stopsetups�
>>
>>
>> \defineXMLenvironment [av] {} {\ensablemode[xml:linebreak]}
>>
>>
>> \defineXMLenvironment [liste] {\setups[xml:linebreak]} {\crlf}
>>
>>
>> or sometign similar, �
>>
>
> I have played around with this solution for a bit
> and�\defineXMLenvironment [liste] {} {\setups[xml:linebreak]}
> �seems to work for the <liste>-tag. But it not entirely clear to me
> how this should work for the <av>-tag when it is not followed by
> another tag on the same line.�
\def\dowithnextXMLelement#1%
{\pushmacro\executeXMLelement
\def\executeXMLelement{#1\popmacro\executeXMLelement}}
\defineXMLenvironment[aap]
{}
{\dowithnextXMLelement
{\doifelse{\currentXMLelement}{noot}
{ lust }
{ kust }}}
\starttext
\startXMLdata
<aap>een aap</aap><noot>een noot</noot>
<aap>een aap</aap><mies>een mies</mies>
\stopXMLdata
\stoptext
this assumes that i keep \executeXMLelement in its current location which is quite certain
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
prev parent reply other threads:[~2006-08-27 18:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-27 12:50 XML-lookahead Sjoerd Siebinga
2006-08-27 12:56 ` XML-lookahead Hans Hagen
2006-08-27 13:29 ` XML-lookahead Sjoerd Siebinga
2006-08-27 18:00 ` 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=44F1DDC4.8010105@wxs.nl \
--to=pragma@wxs.nl \
--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).