You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
per @johnkpaul 's suggestion, we should refine the behavior when faced with an invalid XML document.
today, XMLToReact#convert will simply log a warning when supplied with an invalid XML document. it will also log the warning for all xmldom error levels.
Here are a few questions around this:
How should we handle the three xmldom error levels (warning, error, fatal)?
Should we strictly throw an error when coming across an invalid XML document?
Should we have a 'quirks mode' option with forgiving parsing, similar to HTML parsing?
If yes to the previous question, should we be in 'quirks mode' by default, and have an opt-in 'strict mode'?
The text was updated successfully, but these errors were encountered:
My higher order feedback is that whatever decision is made as to the behavior on invalid input is clearly documented and not surprising to a user of this library.
With respect to your questions in particular, I'd say what are the actual needs of Muse? When you have a business user typing their own XML and they make a mistake, which one of these options would you prefer?
Other than clearly documenting, IMHO, you don't need to add any special and extra features just because it's being open sourced.
Generic parsing and handling can go here; anything specific to an application should live downstream.
As for whether we throw or simply log errors (and pave over them) could be configurable. My instinct is to throw and let the application decide what to do.
per @johnkpaul 's suggestion, we should refine the behavior when faced with an invalid XML document.
today,
XMLToReact#convert
will simply log a warning when supplied with an invalid XML document. it will also log the warning for allxmldom
error levels.Here are a few questions around this:
xmldom
error levels (warning, error, fatal)?The text was updated successfully, but these errors were encountered: