Re: [NTG-context] How to get attribute value from xml tag?

2019-10-20 Thread Geert Verhaag
On 20-10-19 16:38, Thomas A. Schmitz wrote: On 20. Oct 2019, at 16:05, Geert Verhaag wrote: The \xmlfirst{#1}{distance} yields 20, but how can the unit attribute value km be accessed? Gerard \xmlattribute{#1}{/distance}{unit} (probably, you need to make a real example. See xml-mkiv.pdf,

Re: [NTG-context] How to get attribute value from xml tag?

2019-10-20 Thread Thomas A. Schmitz
> On 20. Oct 2019, at 16:05, Geert Verhaag wrote: > > The \xmlfirst{#1}{distance} yields 20, but how can the unit attribute value > km be accessed? > > Gerard > > \xmlattribute{#1}{/distance}{unit} (probably, you need to make a real example. See xml-mkiv.pdf, chapter 3.6) Thomas

[NTG-context] How to get attribute value from xml tag?

2019-10-20 Thread Geert Verhaag
Hi, Struggling with XML in ConTeXt. I'have the following tag in my xml file: ...       20   ... \startxmlsetups xml:invoice:travel   \xmlfirst{#1}{distance} \stopxmlsetups The \xmlfirst{#1}{distance} yields /20/, but how can the unit attribute value /km/ be accessed? Gerard -- _