ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@bittext.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
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	[thread overview]
Message-ID: <346F8E9B-BE5B-4D29-A881-8895E1C42086@bittext.nl> (raw)
In-Reply-To: <07188C1B-A887-4F57-A303-09465B8E6298@rna.nl>


[-- Attachment #1.1: Type: text/plain, Size: 2178 bytes --]

Hi Gerben,

Not behind a computer right now, but you should look at the output of 

   table.print(foo)

Best wishes,
Taco

> On 14 Feb 2021, at 23:12, Gerben Wierda <gerben.wierda@rna.nl> wrote:
> 
> 
> foo.at[“attribute:B”]
> 
> I looked at the code and guessed this. Still haven’t found really good documentation for lua, lua in ConTeXt, and especially theXML stuff (it’s all written as \xmlsomething TeX commands. No idea if this is ConTeXt, lua or whatever but it works.
> 
> Gerben Wierda (LinkedIn)
> R&A Enterprise Architecture (main site)
> Book: Chess and the Art of Enterprise Architecture
> Book: Mastering ArchiMate
> 
>> On 14 Feb 2021, at 22:40, Gerben Wierda <gerben.wierda@rna.nl> wrote:
>> 
>> If I have an XML element like this:
>> 
>> <A x=“one” attribute:B=“two"/>
>> 
>> and it has been read in a lua variable foo, I can get at attribute x with foo.at.x 
>> 
>> But how do I get at attribute:B?
>> 
>> Gerben Wierda (LinkedIn)
>> R&A Enterprise Architecture (main site)
>> Book: Chess and the Art of Enterprise Architecture
>> Book: Mastering ArchiMate
>> 
>> ___________________________________________________________________________________
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-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-context@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
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 8679 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2021-02-14 22:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14 21:40 Gerben Wierda
2021-02-14 22:11 ` Gerben Wierda
2021-02-14 22:31   ` Taco Hoekwater [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=346F8E9B-BE5B-4D29-A881-8895E1C42086@bittext.nl \
    --to=taco@bittext.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).