Hi,

 

I’m trying to typeset a poem from XML, but I can’t figure out how to make the inbetween key working here.

As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines…\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here.

How can this be done?

 

Best,

Denis

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setuplines[before={\blank},after={\blank},inbetween={ARE WE INBETWEEN?\blank}]

 

% XML Nodes auswählen

\startxmlsetups xml:test

                \xmlsetsetup{#1}{*}{-}

                \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*}

\stopxmlsetups

 

\xmlregistersetup{xml:test}

 

\startxmlsetups xml:doc

                \xmlflush{#1}

\stopxmlsetups

 

\startxmlsetups xml:poem

                \startlines

                               \xmlflush{#1}

                \stoplines

\stopxmlsetups

 

\startxmlsetups xml:stanza

   \xmlflushlinewise{#1}\par %this has no effect

\stopxmlsetups

 

\startxmlsetups xml:line

                \xmlflush{#1}

\stopxmlsetups

 

\startbuffer[test]

<?xml version='1.0' standalone='yes?>

<doc>

<poem>

<stanza>

<line>The</line>

<line>lines</line>

<line>are</line>

<line>there!</line>

</stanza>

<stanza>

<line>The</line>

<line>lines</line>

<line>are</line>

<line>there!</line>

</stanza>

</poem>

</doc>

\stopbuffer

 

 

\starttext

 

This works:

 

\startlines

The

lines

are

there!

 

The

lines

are

there!

\stoplines

 

Apparently, \type{\par} has no effect here:

 

\startlines

The

lines

are

there!\par% \par has no effect here

The

lines

are

there!

\stoplines

 

For background, this is what I'm actually trying to do:

 

\xmlprocessbuffer{test}{test}{}

 

\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%