ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xmlrefatt
@ 2018-04-10 13:33 dr. Hans van der Meer
  0 siblings, 0 replies; only message in thread
From: dr. Hans van der Meer @ 2018-04-10 13:33 UTC (permalink / raw)
  To: NTG ConTeXt


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

There is a slight restriction on \xmlrefatt that makes its use problematic, because it does not differentiate between an absent attribute and an attribute consisting of an empty string.
The use for \xmlrefatt I had in mind was (a) do nothing if the attribute is absent, and (b) reset some value to its default value when the attribute is present but an empty string.

Is it an option that its implementation is changed? A boolean return value will be fine, because false then can signify the attribute’s absence and true its presence. In the latter case it is safe to retrieve the attribute which then might be an empty string.

Summarizing: the fact that \xmlrefatt tries to do two different things at the same time (signalling presence/absence) and returning an attribute, in a certain sense cripples its use.

dr. Hans van der Meer



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

[-- Attachment #2: Type: text/plain, Size: 492 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-10 13:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 13:33 xmlrefatt dr. Hans van der Meer

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).