ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* strip space in xml
@ 2012-01-01 15:53 Meer, H. van der
  0 siblings, 0 replies; only message in thread
From: Meer, H. van der @ 2012-01-01 15:53 UTC (permalink / raw)
  To: ConTeXt NTG

I have the following problem with xml processing. Spurious space is typeset, annoyingly visible when nearly equivalent structures are typeset one under another. 
Take the following node structure where the <text> node is the one intended to contribute to the typeset material, whereas <anothernode> is not.

<root>
  <node>
    <anothernode>..</anothernode>
    <text>
      ..
    </text>
  </node>
</root>

Doing in the <root>-node: \xmlstripnolines{#1}{/node}\xmlall{#1}{/node} removes some of the unwanted spaces but not all. Especially the space between </anothernode> and <text> does not completely disappear (seen with \xmlstrippednolines).
This also occurs when </anothernode> and <text> are on the same line separated by a number of spaces.
The space disappears when </anothernode><text> are put next to another. However, this destroys the neat typography of the xml.

The manual tells me that \xmlstripnolines ..collapses embedded spaces from nodes under node.. That seems correct in that obviously the code leaves one space from the intervening spaces/newlines.
But this gains me nothing! Why leaving a single space between <node> and <next-node>? For me this defeats the purpose of xmlstripnolines.

Can this be remedied?

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:[~2012-01-01 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-01 15:53 strip space in xml Meer, H. van der

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