From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110586 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Question about parsing XML and attributes (normally var.at.attrib) with a name with ':' in it Date: Sun, 14 Feb 2021 23:31:50 +0100 Message-ID: <346F8E9B-BE5B-4D29-A881-8895E1C42086@bittext.nl> References: <07188C1B-A887-4F57-A303-09465B8E6298@rna.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (1.0) Content-Type: multipart/mixed; boundary="===============4554556457649483612==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32871"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 14 23:32:18 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBPwA-0008TY-K2 for gctc-ntg-context-518@m.gmane-mx.org; Sun, 14 Feb 2021 23:32:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AAB6A2800E9; Sun, 14 Feb 2021 23:31:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-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 1l7sQKxhAa4b; Sun, 14 Feb 2021 23:31:55 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C49A6280217; Sun, 14 Feb 2021 23:31:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 14ECE280217 for ; Sun, 14 Feb 2021 23:31:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-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 TKIEOChj9CA4 for ; Sun, 14 Feb 2021 23:31:54 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=5.39.185.224; helo=server5b.aanhet.net; envelope-from=taco@bittext.nl; receiver= Original-Received: from server5b.aanhet.net (server5b.aanhet.net [5.39.185.224]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 25C2A2800E9 for ; Sun, 14 Feb 2021 23:31:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by server5b.aanhet.net (Postfix) with ESMTP id E449E1E7 for ; Sun, 14 Feb 2021 23:31:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at server5.aanhet.net Original-Received: from server5b.aanhet.net ([127.0.0.1]) by localhost (server5b.aanhet.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gKJhiIR_PWjp for ; Sun, 14 Feb 2021 23:31:51 +0100 (CET) Original-Received: from [192.168.178.21] (boo.demon.nl [83.163.247.99]) by server5b.aanhet.net (Postfix) with ESMTPSA id 643A812F for ; Sun, 14 Feb 2021 23:31:51 +0100 (CET) In-Reply-To: <07188C1B-A887-4F57-A303-09465B8E6298@rna.nl> X-Mailer: iPad Mail (18D52) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:110586 Archived-At: --===============4554556457649483612== Content-Type: multipart/alternative; boundary=Apple-Mail-E5D063DA-97CA-43F7-93EC-65F781852C15 Content-Transfer-Encoding: 7bit --Apple-Mail-E5D063DA-97CA-43F7-93EC-65F781852C15 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Gerben, Not behind a computer right now, but you should look at the output of=20 table.print(foo) Best wishes, Taco > On 14 Feb 2021, at 23:12, Gerben Wierda wrote: >=20 > =EF=BB=BF > foo.at[=E2=80=9Cattribute:B=E2=80=9D] >=20 > I looked at the code and guessed this. Still haven=E2=80=99t found really g= ood documentation for lua, lua in ConTeXt, and especially theXML stuff (it=E2= =80=99s all written as \xmlsomething TeX commands. No idea if this is ConTeX= t, lua or whatever but it works. >=20 > Gerben Wierda (LinkedIn) > R&A Enterprise Architecture (main site) > Book: Chess and the Art of Enterprise Architecture > Book: Mastering ArchiMate >=20 >> On 14 Feb 2021, at 22:40, Gerben Wierda wrote: >>=20 >> If I have an XML element like this: >>=20 >> >>=20 >> and it has been read in a lua variable foo, I can get at attribute x with= foo.at.x=20 >>=20 >> But how do I get at attribute:B? >>=20 >> Gerben Wierda (LinkedIn) >> R&A Enterprise Architecture (main site) >> Book: Chess and the Art of Enterprise Architecture >> Book: Mastering ArchiMate >>=20 >> _________________________________________________________________________= __________ >> If your question is of interest to others as well, please add an entry to= the Wiki! >>=20 >> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-co= ntext >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> _________________________________________________________________________= __________ >=20 > __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry to t= he Wiki! >=20 > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-con= text > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > __________________________________________________________________________= _________ --Apple-Mail-E5D063DA-97CA-43F7-93EC-65F781852C15 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Gerben,

Not behind a computer right now, but you sh= ould look at the output of 

   table.print(foo)

Best wishes,
Taco

<= blockquote type=3D"cite">On 14 Feb 2021, at 23:12, Gerben Wierda <gerben.= wierda@rna.nl> wrote:

=EF=BB=BF
foo.at[=E2=80=9Cattribute:B=E2=80=9D]

I looked at the code and guessed this. Still haven=E2= =80=99t found really good documentation for lua, lua in ConTeXt, and especia= lly theXML stuff (it=E2=80=99s all written as \xmlsomething TeX commands. No= idea if this is ConTeXt, lua or whatever but it works.

=

On 1= 4 Feb 2021, at 22:40, Gerben Wierda <gerben.wierda@rna.nl> wrote:

If I have an XML element like this:

<A x=3D=E2=80=9Cone=E2=80=9D attribute:B=3D= =E2=80=9Ctwo"/>

and it has been read in a lua variable foo, I can get at attribute x with <= a href=3D"http://foo.at/" class=3D"">foo.at.x 

But how do I get at attribute:B?
=


_______________________________________________________= ____________________________
If your question is of interest t= o others as well, please add an entry to the Wiki!

maillist : ntg-context@n= tg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpa= ge  : http://www.pragma= -ade.nl / http://contex= t.aanhet.net
archive  : https://bitbucket.org/phg/contex= t-mirror/commits/
wiki     : http://contextgarden.net
_________________________________________________________________________= __________

_____= ____________________________________________________________________________= __
If your question is of interest to others as well, please= add an entry to the Wiki!

maillist : ntg-c= ontext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits= /
wiki     : http://contextgarden.net
______________________________________________________________= _____________________
= --Apple-Mail-E5D063DA-97CA-43F7-93EC-65F781852C15-- --===============4554556457649483612== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4554556457649483612==--