ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XML element strip?
@ 2006-04-04 21:02 Johannes Graumann
  2006-04-04 21:45 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Graumann @ 2006-04-04 21:02 UTC (permalink / raw)


Hello,

I have a strange question. While working with XML and ConTeXt, I have run
into the TeXnic problem of the interpretation of line breaks. What I would
prefer to do for code clarity sake are things like the following:
<list>
  <item>
    Something
  </item>
  <item>
    else
  </item>
</list>

This is however screwed up by TeXs line break interpretation, forcing me to
format the input like so:
<list>
  <item>Something</item>
  <item>else</item>
</list>

The question now is: is there any way to tell context to strip trailing
whitespaces/line breaks from XML nodes?

Thanks, Joh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XML element strip?
  2006-04-04 21:02 XML element strip? Johannes Graumann
@ 2006-04-04 21:45 ` Hans Hagen
  2006-04-05  0:44   ` Johannes Graumann
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2006-04-04 21:45 UTC (permalink / raw)


Johannes Graumann wrote:
> Hello,
>
> I have a strange question. While working with XML and ConTeXt, I have run
> into the TeXnic problem of the interpretation of line breaks. What I would
> prefer to do for code clarity sake are things like the following:
> <list>
>   <item>
>     Something
>   </item>
>   <item>
>     else
>   </item>
> </list>
>
> This is however screwed up by TeXs line break interpretation, forcing me to
> format the input like so:
> <list>
>   <item>Something</item>
>   <item>else</item>
> </list>
>
> The question now is: is there any way to tell context to strip trailing
> whitespaces/line breaks from XML nodes?
>   
\defineXMLenvironment
  [item]
  {...\ignorespaces}
  {\removeunwantedspaces ...}


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XML element strip?
  2006-04-04 21:45 ` Hans Hagen
@ 2006-04-05  0:44   ` Johannes Graumann
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Graumann @ 2006-04-05  0:44 UTC (permalink / raw)


As always: thanks to the Wiz!

Joh

Hans Hagen wrote:

> Johannes Graumann wrote:
>> Hello,
>>
>> I have a strange question. While working with XML and ConTeXt, I have run
>> into the TeXnic problem of the interpretation of line breaks. What I
>> would prefer to do for code clarity sake are things like the following:
>> <list>
>>   <item>
>>     Something
>>   </item>
>>   <item>
>>     else
>>   </item>
>> </list>
>>
>> This is however screwed up by TeXs line break interpretation, forcing me
>> to format the input like so:
>> <list>
>>   <item>Something</item>
>>   <item>else</item>
>> </list>
>>
>> The question now is: is there any way to tell context to strip trailing
>> whitespaces/line breaks from XML nodes?
>>   
> \defineXMLenvironment
>   [item]
>   {...\ignorespaces}
>   {\removeunwantedspaces ...}
> 
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-05  0:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-04 21:02 XML element strip? Johannes Graumann
2006-04-04 21:45 ` Hans Hagen
2006-04-05  0:44   ` Johannes Graumann

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