On Mon, Apr 06, 2020 at 05:15:46PM +0200, josef Reidinger wrote:
as you can read in previous mails, I am playing with xml parser used in YaST. Nokogiri looks like the best option due to its relax ng support and its availability in SLE (used in SLES-HA).
And nokogiri has also one interesting feature and that is relaxed parsing that tries hard to parse document even when it is malformed[1] ( but you can still log errors). Example that nokogiri can parse: <test>
value </test> which results in something like test -> not_closed -> not_closed2 -> value tree
I check old yast yast parser and it is strict here and return nil and set error. Question is should we keep old behavior or try to relax it and just logs errors and warnings? For working profiles nothing changes.
I think there parser should continue to be strict. Just imagine
people start to use broken XML as AutoYaST profiles. Years later
we cannot change the XML parser implementation because it behaves
different for those broken profiles and people complain that we
break compatibility.
Also see the criticism section in
https://en.wikipedia.org/wiki/Robustness_principle.
ciao Arvin
--
Arvin Schnell,