ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* stripping space from xml nodes
@ 2010-03-21  9:24 Hans van der Meer
  0 siblings, 0 replies; only message in thread
From: Hans van der Meer @ 2010-03-21  9:24 UTC (permalink / raw)
  To: NTG ConTeXt

In order to have (1)
	<abc>text</abc>
behave the same as (2)
	<abc>
		text
	</abc>
one can use \xmlstripped{node}{lpath}.
However, the drawback is that I found there is no further node  
expansion of inner content. For example \xmlstripped with <abc>text  
<somenode/> text</abc> returned "text <somenode/> text".

I have already reported earlier that I could not see \xmlstrip{node} 
{lpath} work as I understood it. That is, it seems to me that in:
	\startxmlsetups xml:abc
		\xmlstrip{#1}{}
	\stopxmlsetups
this would strip the spaces from (2) above. It didn't do that, while I  
also tried of course \xmlstrip in the node enclosing <abc>, also to no  
avail.

As a work around one finds:
	\startxmlsetups xml:abc
		\ignorespaces	% removes spurious space before
		\xmltext{#1}{}
		\unskip		% removes spurious space after
	\stopxmlsetups
but it is the sort of a kludge I do not feel happy about, apart from  
the fact that either this has to be put everywhere or another macro  
layer put around all \xml's suffering.

This boils down to two questions:
(1) how about \xmlstrip?
(2) is the observed behaviour of \xmlstripped (not expanding nodes  
below) as it should?

As Hans Hagen mentioned before he would have I look into it, I kindly  
ask if he already has found time for this.

Hans van der Meer




___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

only message in thread, other threads:[~2010-03-21  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-21  9:24 stripping space from xml nodes 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).