ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt source from XML
@ 2018-10-22 19:23 Pablo Rodriguez
  2018-10-23  7:03 ` Taco Hoekwater
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Rodriguez @ 2018-10-22 19:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

when dealing with XML, sometimes I find errors that I don’t know where
they might come from.

Is it possible to get the full ConTeXt source from a XML document
instead of typesetting it?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 8+ messages in thread

* Re: ConTeXt source from XML
  2018-10-22 19:23 ConTeXt source from XML Pablo Rodriguez
@ 2018-10-23  7:03 ` Taco Hoekwater
  2018-10-23  7:16   ` luigi scarso
  2018-10-23  8:43   ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Taco Hoekwater @ 2018-10-23  7:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

On a similar vein: I get my XML files from an outside source,
and I sometimes forget to call xmllint before processing. Is
there a chance for ConTeXt to report a warning when it 
encounters issues with the XML?

Best wishes,
Taco

> On 22 Oct 2018, at 21:23, Pablo Rodriguez <oinos@gmx.es> wrote:
> 
> Dear list,
> 
> when dealing with XML, sometimes I find errors that I don’t know where
> they might come from.
> 
> Is it possible to get the full ConTeXt source from a XML document
> instead of typesetting it?
> 
> Many thanks for your help,
> 
> Pablo
> -- 
> http://www.ousia.tk
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

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] 8+ messages in thread

* Re: ConTeXt source from XML
  2018-10-23  7:03 ` Taco Hoekwater
@ 2018-10-23  7:16   ` luigi scarso
  2018-10-23  7:20     ` Taco Hoekwater
  2018-10-23  8:43   ` Hans Hagen
  1 sibling, 1 reply; 8+ messages in thread
From: luigi scarso @ 2018-10-23  7:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Tue, Oct 23, 2018 at 9:04 AM Taco Hoekwater <taco@elvenkind.com> wrote:

> Hi,
>
> On a similar vein: I get my XML files from an outside source,
> and I sometimes forget to call xmllint before processing. Is
> there a chance for ConTeXt to report a warning when it
> encounters issues with the XML?
>

hm xmllint is also a validating parser... I don't think there is much to
gain
in re-implementing  all in lua ... even a lua binding is questionable .

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 865 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] 8+ messages in thread

* Re: ConTeXt source from XML
  2018-10-23  7:16   ` luigi scarso
@ 2018-10-23  7:20     ` Taco Hoekwater
  0 siblings, 0 replies; 8+ messages in thread
From: Taco Hoekwater @ 2018-10-23  7:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> On 23 Oct 2018, at 09:16, luigi scarso <luigi.scarso@gmail.com> wrote:
> 
> 
> 
> On Tue, Oct 23, 2018 at 9:04 AM Taco Hoekwater <taco@elvenkind.com> wrote:
> Hi,
> 
> On a similar vein: I get my XML files from an outside source,
> and I sometimes forget to call xmllint before processing. Is
> there a chance for ConTeXt to report a warning when it 
> encounters issues with the XML?
> 
> hm xmllint is also a validating parser... I don't think there is much to gain
> in re-implementing  all in lua ... even a lua binding is questionable .

Sure, but as it stands ConTeXt silently ignores (== do not process at all)
broken XML files. Some sort of indication that not all is right would
be really helpful, even if it was just “xml file contained no elements”.

Taco

___________________________________________________________________________________
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] 8+ messages in thread

* Re: ConTeXt source from XML
  2018-10-23  7:03 ` Taco Hoekwater
  2018-10-23  7:16   ` luigi scarso
@ 2018-10-23  8:43   ` Hans Hagen
  2018-10-23  9:04     ` Thomas A. Schmitz
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2018-10-23  8:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Taco Hoekwater

On 10/23/2018 9:03 AM, Taco Hoekwater wrote:
> Hi,
> 
> On a similar vein: I get my XML files from an outside source,
> and I sometimes forget to call xmllint before processing. Is
> there a chance for ConTeXt to report a warning when it
> encounters issues with the XML?
examples ... i thought that there is a kind of error message on the 
console (at least in a tex run)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 8+ messages in thread

* Re: ConTeXt source from XML
  2018-10-23  8:43   ` Hans Hagen
@ 2018-10-23  9:04     ` Thomas A. Schmitz
  2018-10-23  9:18       ` Taco Hoekwater
  2018-10-23 11:45       ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas A. Schmitz @ 2018-10-23  9:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On 23. Oct 2018, at 10:43, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> examples ... i thought that there is a kind of error message on the console (at least in a tex run)

Yes, I often get errors like “can’t close tag <foo> with </bar> on line XXXX.” But I don’t know in which situations these messages pop up and when context simply bails out.

Thomas
___________________________________________________________________________________
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] 8+ messages in thread

* Re: ConTeXt source from XML
  2018-10-23  9:04     ` Thomas A. Schmitz
@ 2018-10-23  9:18       ` Taco Hoekwater
  2018-10-23 11:45       ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Taco Hoekwater @ 2018-10-23  9:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

Hm,

I usually get a variation of “invalid xml file” typeset inside the document,
but nothing on the command line. See attached example.

Best wishes,
Taco

> On 23 Oct 2018, at 11:04, Thomas A. Schmitz <thomas.schmitz@uni-bonn.de> wrote:
> 
> 
>> On 23. Oct 2018, at 10:43, Hans Hagen <j.hagen@xs4all.nl> wrote:
>> 
>> examples ... i thought that there is a kind of error message on the console (at least in a tex run)
> 
> Yes, I often get errors like “can’t close tag <foo> with </bar> on line XXXX.” But I don’t know in which situations these messages pop up and when context simply bails out.
> 
> Thomas
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

Taco Hoekwater
Elvenkind BV




[-- Attachment #2: runqtest.tex --]
[-- Type: application/octet-stream, Size: 268 bytes --]

\starttext

\startxmlsetups xml:oursetups
   \xmlsetfunction {\xmldocument}{example}{lxml.flush}
\stopxmlsetups

\startbuffer[demo]
<example>inputted text<example>
\stopbuffer

\xmlregisterdocumentsetup{demo}{xml:oursetups}

\xmlprocessbuffer{demo}{demo}{}

\stoptext

[-- Attachment #3: 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] 8+ messages in thread

* Re: ConTeXt source from XML
  2018-10-23  9:04     ` Thomas A. Schmitz
  2018-10-23  9:18       ` Taco Hoekwater
@ 2018-10-23 11:45       ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2018-10-23 11:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Thomas A. Schmitz

On 10/23/2018 11:04 AM, Thomas A. Schmitz wrote:
> 
>> On 23. Oct 2018, at 10:43, Hans Hagen <j.hagen@xs4all.nl> wrote:
>>
>> examples ... i thought that there is a kind of error message on the console (at least in a tex run)
> 
> Yes, I often get errors like “can’t close tag <foo> with </bar> on line XXXX.” But I don’t know in which situations these messages pop up and when context simply bails out.
normally when i see such an error i check the file with tidy

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2018-10-23 11:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 19:23 ConTeXt source from XML Pablo Rodriguez
2018-10-23  7:03 ` Taco Hoekwater
2018-10-23  7:16   ` luigi scarso
2018-10-23  7:20     ` Taco Hoekwater
2018-10-23  8:43   ` Hans Hagen
2018-10-23  9:04     ` Thomas A. Schmitz
2018-10-23  9:18       ` Taco Hoekwater
2018-10-23 11:45       ` Hans Hagen

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