gentext.template.exists -- possible bug

Richard Hamilton <[email protected]> Tue, 11 Aug 2020 18:06:18 -0700
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
The template gentext.template.exists in the 1.0 stylesheets has what may be a bug.

This template says that it returns 1 if a gentext template exists for a particular context and name and 0 if the template doesn’t exist.

However, if a gentext template does exist, but it has a text value that is empty (e.g., <l:template name=“somename” text=“”/>), gentext.template.exists returns 0, not 1.

That is, it doesn’t distinguish between a template with a null value for the text and a non-existent template.

My question is whether this is a bug or a feature? I’m inclined to think it’s a bug, but I’m not sure.

If it’s a bug, I’m glad to file a report.

Best regards,
Dick Hamilton
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
[email protected]