ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda <gerben.wierda@rna.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:11:55 +0100	[thread overview]
Message-ID: <07188C1B-A887-4F57-A303-09465B8E6298@rna.nl> (raw)
In-Reply-To: <417D24C8-7EA0-4F38-8CE3-E8267CC28CD2@rna.nl>


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

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 <https://www.linkedin.com/in/gerbenwierda>)
R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

> 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 <http://foo.at/>.x 
> 
> But how do I get at attribute:B?
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
> R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> ___________________________________________________________________________________
> 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: 7531 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:11 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 [this message]
2021-02-14 22:31   ` Taco Hoekwater

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=07188C1B-A887-4F57-A303-09465B8E6298@rna.nl \
    --to=gerben.wierda@rna.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).