I really need to remove the leading and trailing whitespace from nodes.
Tried in vain to get \xmlstrip (and friends like \xmlstripnolines) working. Just doing \xmlstripped{node}{lpath} is not adequate, because I want to order the output when a node contains several subnodes (using \xmlfilter for this). Below a minimal example. Tweaking the \xmlstrip in all sorts of way did not help.

Hans van der Meer

\startxmlsetups xml:testsetups
        \xmlsetsetup{test}{test|a|b|c}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:test
        \xmlstrip{#1}{}
        \xmltext{#1}{} No spaces should showup between nodes!
\stopxmlsetups

\startxmlsetups xml:a
        \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
        \xmltext{#1}{}
\stopxmlsetups

\startxmlsetups xml:c
        \xmlflush{#1}
\stopxmlsetups

\starttext
\xmlprocessfile{test}{test.xml}{}
\stoptext

Input xml-file:
<?xml version="1.0" encoding="UTF-8"?>
<test>
        <a>
                This is node a:
                <b>
                        :Node b:
                </b>
                <c>
                        :Node c:
                </c>
        </a>
</test>

The result:

Attachment: test.pdf
Description: Adobe PDF document






___________________________________________________________________________________
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 via email to