From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12639 invoked from network); 19 Apr 2023 09:25:12 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 19 Apr 2023 09:25:12 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 746A35EB; Wed, 19 Apr 2023 11:24:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id itSzIDCzCnGL; Wed, 19 Apr 2023 11:24:45 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3135313C2; Wed, 19 Apr 2023 11:24:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D08E713C2 for ; Wed, 19 Apr 2023 11:24:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Giimqd1-SN8a for ; Wed, 19 Apr 2023 11:24:42 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.54.42.167; helo=smtpq4.tb.mail.iss.as9143.net; envelope-from=havdmeer@ziggo.nl; receiver= Received: from smtpq4.tb.mail.iss.as9143.net (smtpq4.tb.mail.iss.as9143.net [212.54.42.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 5CB555EB for ; Wed, 19 Apr 2023 11:24:42 +0200 (CEST) Received: from [212.54.42.105] (helo=smtp1.tb.mail.iss.as9143.net) by smtpq4.tb.mail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pp43O-0002C9-1N for ntg-context@ntg.nl; Wed, 19 Apr 2023 11:24:42 +0200 Received: from smtpclient.apple ([84.104.102.59]) by smtp1.tb.mail.iss.as9143.net with ESMTPA id p43NpZTIlszfLp43NpvoX1; Wed, 19 Apr 2023 11:24:42 +0200 X-Env-Mailfrom: havdmeer@ziggo.nl X-Env-Rcptto: ntg-context@ntg.nl X-SourceIP: 84.104.102.59 X-CNFS-Analysis: v=2.4 cv=SrhWqtC0 c=1 sm=1 tr=0 ts=643fb35a cx=a_exe a=r8aFSP8g8qyxuwAfcqn69g==:117 a=r8aFSP8g8qyxuwAfcqn69g==:17 a=MiNTnEJAAAAA:8 a=TRntDIGCAAAA:8 a=YEMqx4UAAAAA:8 a=ACQCx6kCAAAA:8 a=xtERp6CFAAAA:8 a=a3nu-2BBAAAA:8 a=-VMnXMnVsgmewzIcxosA:9 a=CjuIK1q_8ugA:10 a=BR2LGboXYIlh9eULtE8A:9 a=oH8mFDvdiBcCFe6u:21 a=_W_S_7VecoQA:10 a=LmrbSfiT3hecnSZifb5M:22 a=V0662LiR8DSfwiDagK97:22 a=Sab0UneHBzlWrQDlOuxD:22 a=ekCXXmE-vB8RPiJ3MEZb:22 X-Authenticated-Sender: havdmeer@ziggo.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ziggo.nl; s=202002corplgsmtpnl; t=1681896282; bh=qUSZu7SHyFpEoW+m8ya88VLqrqmdpcWSZ6m5UM8tVO0=; h=From:Subject:Date:References:To:In-Reply-To; b=ozXU1p9fmmjP9RPXzOb1W5cCtcNQj7Ocj5Oph+SVboYUxPsqGJdogORz1QEZQKlsL PhJxVpn/5LGjVwLqnaYiPtNsfoM1BaTq8woacsZdQ3Ib0IfdfPREXHDJEbeyVfrRjZ BKz3QSlzt3/jQmHdxNRo0FLcpQBZXQYOcx2IyMziD8ePzMFI2V9rWgsD6cvuT7YrYu ClM7QbD0TtqdN36z8PYIcDYlWiiA72zhvH+ODwbPEPNTBtSVAW83m7HDpbZFCWxPWC sZJDSORZdZkuX1+xJl75DmLHtDhRM3BLYQG+eMhGRQhClKRX+2HKrOkUkFXGTSa0yt FxhgzIaBIDW+w== Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Date: Wed, 19 Apr 2023 11:24:31 +0200 References: <33EA9CDE-5C35-426F-9ABE-5FCA57904E6B@ziggo.nl> <04018D6D-B399-4984-A83B-05BA93BD6DDD@ziggo.nl> To: NTG ConTeXt In-Reply-To: <04018D6D-B399-4984-A83B-05BA93BD6DDD@ziggo.nl> Message-Id: <226F29FE-B8FD-4213-9819-A4209865E0B1@ziggo.nl> X-Mailer: Apple Mail (2.3731.500.231) X-CMAE-Envelope: MS4xfB+2aNOIAsjKclnRJdktEewZ6AnkA9ZIV0cYbznGPACdB0PyE5kZYIcdN3XMSRKei8f6YAdXLn2VLXbrO/yB834PZ/uz5hbQV+THrZ5CflbnuGf+UlTj aoWBqx+8hHayfdHdEy0u56ip/lhy9CalULukQ5AaX8GoihuBLMLKbT4boQ9XD/b//gI9rVJXz0cAAg== Subject: Re: [NTG-context] xmlsetentity on the fly? X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.38 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Hans van der Meer via ntg-context Reply-To: mailing list for ConTeXt users Cc: Hans van der Meer Content-Type: multipart/mixed; boundary="===============5841130930713836345==" Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" --===============5841130930713836345== Content-Type: multipart/alternative; boundary="Apple-Mail=_2C443AFE-4C62-49CB-8831-BCEFD6FE7314" --Apple-Mail=_2C443AFE-4C62-49CB-8831-BCEFD6FE7314 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii After some experiments I am now fairly convinced that the entities are = substituted BEFORE the typesettting actually starts. And thus changing = the entity on the fly will have no effect. Is there a flag that can be = set in order to delay the substitution until the actual moment of = typesetting that part of the input? I examined files lxml-ent.lua and = lxml-tex.lua but could not find how to this. dr. Hans van der Meer > On 17 Apr 2023, at 18:11, Hans van der Meer via ntg-context = wrote: >=20 > I tried=20 > \directlua{xml.registerentity("DATE","NEWDATE")} >=20 > but neither does effect a change in the entity. >=20 > Why is that entry not set in the Lua-table entities? (file = xml-ent.lua) has as that function: >=20 > function xml.registerentity(key,value) > entities[key] =3D value > if trace_entities then > report_xml("registering entity %a as %a",key,value) > end > end >=20 >=20 >> On 17 Apr 2023, at 12:32, Hans van der Meer = wrote: >>=20 >> I would like to change an entity 'on the fly'. Example >>=20 >> \def\DATE{THEDATE}\expanded{\xmlsetentity{DATE}{\DATE}} >>=20 >> \startxmlsetups typ:event >>=20 >> \def\DATE{NEWDATE}\expanded{\xmlsetentity{DATE}{\DATE}} >>=20 >> Using &DATE; within the . >>=20 >> \stopxmlsetups >>=20 >> However, using &DATE; inside an always results in THEDATE and = never in NEWDATE. >>=20 >> How can I change the value of the entity inside the xmlsetups? >>=20 >=20 > dr. Hans van der Meer > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > = __________________________________________________________________________= _________ --Apple-Mail=_2C443AFE-4C62-49CB-8831-BCEFD6FE7314 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii After some = experiments I am now fairly convinced that the entities are substituted = BEFORE the typesettting actually starts. And thus changing the entity on = the fly will have no effect. Is there a flag that can be set in order to = delay the substitution until the actual moment of typesetting that part = of the input? I examined files lxml-ent.lua and lxml-tex.lua but could = not find how to this.

dr. Hans van der = Meer

On 17 = Apr 2023, at 18:11, Hans van der Meer via ntg-context = <ntg-context@ntg.nl> wrote:

I tried 
\directlua{xml.registerentity("DATE","NEWDATE")}
but neither does effect a change in the = entity.

Why is that entry not set in the = Lua-table entities? (file xml-ent.lua) has as that = function:

function xml.registerentity(key,value)
    entities[key] =3D = value
    if = trace_entities then
  =       report_xml("registering entity %a as = %a",key,value)
    = end
end


On 17 Apr 2023, at 12:32, Hans van der Meer = <havdmeer@ziggo.nl> wrote:

I = would like to change an entity 'on the fly'. = Example

\def\DATE{THEDATE}\expanded{\xmlsetentity{DATE}{\DATE}}
<= div>
\startxmlsetups typ:event

= \def\DATE{NEWDATE}\expanded{\xmlsetentity{DATE}{\DATE}}

Using &DATE; within the = <event>.

\stopxmlsetups

However, = using &DATE; inside an <event> always results in THEDATE and = never in NEWDATE.

How can I change the value of = the entity inside the xmlsetups?


dr. Hans van der = Meer
______________________= _____________________________________________________________
If your = question is of interest to others as well, please add an entry to the = Wiki!

maillist : ntg-context@ntg.nl / = https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : = https://www.pragma-ade.nl / http://context.aanhet.net
archive  : = https://bitbucket.org/phg/context-mirror/commits/
wiki =     : = https://contextgarden.net
_____________________________________________= ______________________________________

= --Apple-Mail=_2C443AFE-4C62-49CB-8831-BCEFD6FE7314-- --===============5841130930713836345== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ --===============5841130930713836345==--