From: Hans van der Meer <H.vanderMeer@uva.nl>
To: NTG ConTeXt <ntg-context@ntg.nl>
Subject: stripping space from xml nodes
Date: Sun, 21 Mar 2010 10:24:46 +0100 [thread overview]
Message-ID: <301A6C6F-E3D9-4BD2-98FA-E8692AA31687@uva.nl> (raw)
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
___________________________________________________________________________________
reply other threads:[~2010-03-21 9:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=301A6C6F-E3D9-4BD2-98FA-E8692AA31687@uva.nl \
--to=h.vandermeer@uva.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).