[NTG-context] Is it possible to make xml.load a bit more 'verbose' when it encounters errors?
Hans van der Meer
havdmeer at ziggo.nl
Thu May 14 08:53:29 CEST 2020
Gerben,
Maybe this is of some use. The Lua code in the file checks the xml and returns info when something is wrong.
I am using it for example in my takenotes module as:
<notes file="events/na-30416155-5-48v.xml" checkxml="yes"/>
And this is a sketch of how it is embedded in that module:
% Prerun an xml check.
\doifinset{\xmlatt{#1}{checkxml}}{yes,on,true}%
{\xmlcommand{#1}{.}{xmlcommon:checkxml}}
% Execute this code if no error was found.
etc.
dr. Hans van der Meer
> On 13 May 2020, at 23:00, Gerben Wierda <gerben.wierda at rna.nl> wrote:
>
> I am loading an xml.file. I sometimes make mistakes editing that file and then xml.load creates a string that contains
>
> <error>invalid xml file - parsed text</error>
>
> At that point I check my file and sometimes (like now) I cannot find the error.
>
> Is there a way to make xml.load somewhat more verbose about where it encounters the error?
>
> G
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at 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
> ___________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200514/0a7b0f52/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: checkxml.txt
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200514/0a7b0f52/attachment.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200514/0a7b0f52/attachment-0001.htm>
More information about the ntg-context
mailing list