ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xmlstrippednolines
@ 2018-09-17 19:12 Hans van der Meer
  2018-09-18  8:19 ` xmlstrippednolines Taco Hoekwater
  0 siblings, 1 reply; 2+ messages in thread
From: Hans van der Meer @ 2018-09-17 19:12 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 566 bytes --]

This completely escapes me: \xmlstrippednolines behaves differently for:
(1) no embedded nodes - just the node content
(2) embedded nodes - outer node encloses node content
See the minimal example.

For me this works out a disaster, because in the second case the outer node is added, throwing my program completely off track.

Questions:
Is this the defined behaviour? Then what other means can be used to get the node content and nothing but the node content in both cases?
Why does \xmlstrippednolines behaves in this manner?

dr. Hans van der Meer


[-- Attachment #1.2.1: Type: text/html, Size: 1881 bytes --]

[-- Attachment #1.2.2: test.pdf --]
[-- Type: application/pdf, Size: 7023 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 208 bytes --]

[-- Attachment #1.2.4: test.tex --]
[-- Type: application/octet-stream, Size: 497 bytes --]

\startxmlsetups xml:testsetups
   \xmlsetsetup{test}{test|text}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}

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

\startxmlsetups xml:text
	tex: \xmlflush{#1}\crlf
	xmlstrippednolines: \xmlstrippednolines{#1}{.}\crlf
\stopxmlsetups

\startbuffer[test]
<test>
	<text>Dit is zonder embedded content.</text>
	<text>Dit is met <em>embedded</em> content.</text>
</test>
\stopbuffer

\starttext
   \xmlprocessbuffer{test}{test}{}
\stoptext

[-- Attachment #1.2.5: Type: text/html, Size: 226 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: xmlstrippednolines
  2018-09-17 19:12 xmlstrippednolines Hans van der Meer
@ 2018-09-18  8:19 ` Taco Hoekwater
  0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2018-09-18  8:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> On 17 Sep 2018, at 21:12, Hans van der Meer <havdmeer@ziggo.nl> wrote:
> 
> This completely escapes me: \xmlstrippednolines behaves differently for:
> (1) no embedded nodes - just the node content
> (2) embedded nodes - outer node encloses node content
> See the minimal example.
> 
> For me this works out a disaster, because in the second case the outer node is added, throwing my program completely off track.
> 
> Questions:
> Is this the defined behaviour? Then what other means can be used to get the node content and nothing but the node content in both cases?

\startxmlsetups xml:text
	tex: \xmlflush{#1}\crlf
	xmlstrippednolines: \xmlstripnolines{#1}{.}\xmlflush{#1}\crlf
\stopxmlsetups

> Why does \xmlstrippednolines behaves in this manner?

No idea about that.

Best wishes,
Taco

Taco Hoekwater
Elvenkind BV




___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-09-18  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 19:12 xmlstrippednolines Hans van der Meer
2018-09-18  8:19 ` xmlstrippednolines Taco Hoekwater

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