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 23264 invoked from network); 17 Apr 2023 16:12:02 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 17 Apr 2023 16:12:02 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 304E49B7; Mon, 17 Apr 2023 18:11:31 +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 5XLNeSmD325r; Mon, 17 Apr 2023 18:11:28 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C1995A7F; Mon, 17 Apr 2023 18:11:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B0B01A7F for ; Mon, 17 Apr 2023 18:11:26 +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 0a2Dhu9TIdJw for ; Mon, 17 Apr 2023 18:11:25 +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 3778C9B7 for ; Mon, 17 Apr 2023 18:11:25 +0200 (CEST) Received: from [212.54.42.107] (helo=smtp3.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 1poRRt-00024h-00 for ntg-context@ntg.nl; Mon, 17 Apr 2023 18:11:25 +0200 Received: from smtpclient.apple ([84.104.102.59]) by smtp3.tb.mail.iss.as9143.net with ESMTPA id oRRspQz60D1jioRRspSutw; Mon, 17 Apr 2023 18:11:24 +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=G93aUfo5 c=1 sm=1 tr=0 ts=643d6fac cx=a_exe a=r8aFSP8g8qyxuwAfcqn69g==:117 a=r8aFSP8g8qyxuwAfcqn69g==:17 a=TRntDIGCAAAA:8 a=SQ3RWFiuOsZmDM0vzI0A:9 a=CjuIK1q_8ugA:10 a=7K0d2UuvFCLjqg_dP-EA:9 a=35xEqETliey4gyZq:21 a=_W_S_7VecoQA:10 X-Authenticated-Sender: havdmeer@ziggo.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ziggo.nl; s=202002corplgsmtpnl; t=1681747884; bh=IFSW8t2u9y9G54eampwZrTxYTzJa67Vi2kVLoRFYDsA=; h=From:Subject:Date:References:To:In-Reply-To; b=XmoiZRz/PQpYQsbM2GpnwxbLWGAoNXPd+iQszhvNGgymOlA9xqnT3XfhGsbls4IIv Y+8HPZSFs4jgzm8KPpaLt4TkFjj+MteJWEro4RlxNnD4yGXvzt9nFtdvnAVrI3GkbH M+1lOb8SKxs0LGHC7LcvPaLCWJ5CmacMmi5EH9HqhsHhMU1n1VPT7ZiHzKKCBT0KVG XaNIsDwShEIdSBb2+W/LVbxS9+4H6K2/9Cz/tcmBuuuMY9Ef13LAa/gQvNs31WRwQS z1BQo9UV4F/TSeTuvr8MOnxon70wX4t72cF1W9IjsiJQAbz32cRtPDFIHduJ47J/C9 jeh/YeeI3COog== Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Date: Mon, 17 Apr 2023 18:11:14 +0200 References: <33EA9CDE-5C35-426F-9ABE-5FCA57904E6B@ziggo.nl> To: NTG ConTeXt In-Reply-To: <33EA9CDE-5C35-426F-9ABE-5FCA57904E6B@ziggo.nl> Message-Id: <04018D6D-B399-4984-A83B-05BA93BD6DDD@ziggo.nl> X-Mailer: Apple Mail (2.3731.500.231) X-CMAE-Envelope: MS4xfM3whWHlIYN+1R5ZebAuz+kSzPGNp2c7kOBsvShKMDc/ehLpd+AnwJfRX+JecUbiQllxavnIX070JEC9LXRuFEt75iPEADm3KQxqHEA/cd2iNH8T05it mJ09vp3gEZzWoDrdNs7Vcpbk4z7XxzQ5rRPifJronn8uirgyIGzYDQc909BFc3SQ5qm2FWB+rJ07WQ== 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="===============4247829992483338199==" Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" --===============4247829992483338199== Content-Type: multipart/alternative; boundary="Apple-Mail=_C8CC73AA-530D-4ACA-A148-4B82D7DB964A" --Apple-Mail=_C8CC73AA-530D-4ACA-A148-4B82D7DB964A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I tried=20 \directlua{lxml.registerentity("DATE","NEWDATE")} and \directlua{lxml.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 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 dr. Hans van der Meer= --Apple-Mail=_C8CC73AA-530D-4ACA-A148-4B82D7DB964A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
I = tried 
\directlua{lxml.registerentity("DATE","NEWDATE")}
an= d
\directlua{lxml.registerentity("DATE","NEWDATE")}
<= div>
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
= --Apple-Mail=_C8CC73AA-530D-4ACA-A148-4B82D7DB964A-- --===============4247829992483338199== 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 ___________________________________________________________________________________ --===============4247829992483338199==--