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
The standalone="yes" or standalone="no" clause of the xml header (Prolog) was broken in two places.
The Prolog expected standalone: Option<String>, but Document::new expected it as Option<bool>, which means that if you write a standalone attribute(?), it will never work.
The solutions are to change either change it to Option<bool> in Prolog and adjust the parser accordingly (chosen solution), or use Option<String> in Document::new, which has the problem that things other than "yes" or "no" need to be handled.
Likewise there is a problem with with the actual:
wr!(buf, " standalone={}", if standalone {"yes"} else {"no"});
in Document::new. It produces incorrect xml without the quotations and should be:
wr!(buf, " standalone=\"{}\"", if standalone {"yes"} else {"no"});
Again, this is implemented in the fork, but you may wish to re-implement this yourself. (I unfortunately used cargo fmt on the code which seems to not have been put through the formatter...)
All the best.
The text was updated successfully, but these errors were encountered:
The
standalone="yes"
orstandalone="no"
clause of the xml header (Prolog
) was broken in two places.The
Prolog
expectedstandalone: Option<String>
, butDocument::new
expected it asOption<bool>
, which means that if you write astandalone
attribute(?), it will never work.The solutions are to change either change it to
Option<bool>
inProlog
and adjust the parser accordingly (chosen solution), or useOption<String>
inDocument::new
, which has the problem that things other than "yes" or "no" need to be handled.Likewise there is a problem with with the actual:
in
Document::new
. It produces incorrect xml without the quotations and should be:Again, this is implemented in the fork, but you may wish to re-implement this yourself. (I unfortunately used
cargo fmt
on the code which seems to not have been put through the formatter...)All the best.
The text was updated successfully, but these errors were encountered: