Hi Alex,
1. There was a slight error (still '_xml2' instead of '_xml')
Oops, sorry about that.
2. I replaced occurrences like
(ifn (= '`(chop DOCTYPE)
(list (char) (char) (char) (char) (char) (char) (char)))
with
(if (find '((C) ( C (char))) '`(chop DOCTYPE))
Hi Alex,
So please take your time, and send it to me when ready.
here is the XML parser:
# expects well formed XML
# encoding by picolisp (utf8 only, no utf16 etc.)
# trim whitespace except in cdata
# ignore ? !-- !DOCTYPE
# non-builtin entities as normal text: ent; = ent
(de _xml (In Char)
Hi Alex,
(in file
(pipe (while (and (echo !--) (from --)))
(xml) ) )
I fact, I would like to remove that half-hearted comment feature from
lib/xml.l. Does anybody have objections?
since the XML declaration is optional, I would need to write:
(or (in F (pipe (while (and
Hi Tomas,
It is legal to have comments before the root element (case b.xml).
You are right. Comment handling is buggy here.
Initially, the XML parser did not support comments at all, and they were
introduced later rather listlessly. Just for completeness, because I
never needed them. (This is