[NTG-context] problem with character entities in XML processing

Hans van der Meer havdmeer at ziggo.nl
Thu Apr 19 10:53:36 CEST 2018

The following use of character entities & aborts in ConTeXt. That is of course because the # is seen as a parameter. Changing this to &\#xxx; or &\letterhash xxx; typesets & as is, but that is not the intention, because an ampersand should appear. So, how do I proceed here?

Minimal example:
% test character entity failure.
\startxmlsetups demo:entity
\startxmlsetups demo:entity:root
	\blank Start test:\crlf
	root: <amp> = "&"\crlf
	root: <number> = "&\letterhash 038;”\crlf % &\#038; produces the same
	End test\blank
{\bf Testing use of character entities}\blank
These should produce the same result: \type{&} and \type{&}\blank

dr. Hans van der Meer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180419/4b872ecd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xml-entity.pdf
Type: application/pdf
Size: 14827 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180419/4b872ecd/attachment.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180419/4b872ecd/attachment-0001.html>

More information about the ntg-context mailing list