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 XML parsing libraries browsers use for DOMParser is a lot more picky about XML validity than the one the JanusVR native client uses. Specifically, one error that frequently causes problems is duplicate attributes on objects, for example:
Since "scale" is duplicated, strictly speaking this XML is invalid, but it would be nice if we could handle this gracefully.
At the very least we should detect xml parse errors and show a message to the user, rather than dumping them into an empty or partially-complete room. There's also the option of switching to a pure-js XML parser, but this would make XML parsing slower across the board.
Another option worth considering is the idea of running the XML through an XSLT transform before trying to parse it. It may be possible to write an XSLT rule which will strip these duplicates - or it's possible that it will just fail to run because the XML is invalid.
The text was updated successfully, but these errors were encountered:
Unfortunately our hands are mostly tied on this since we use the browser's built-in XML parsing functionality. I've since added some parsing feedback when XML errors prevent the page from loading, but short of embedding our own XML parsing library, I think we can just live with the fact that malformed XML isn't supported
The XML parsing libraries browsers use for DOMParser is a lot more picky about XML validity than the one the JanusVR native client uses. Specifically, one error that frequently causes problems is duplicate attributes on objects, for example:
Since "scale" is duplicated, strictly speaking this XML is invalid, but it would be nice if we could handle this gracefully.
At the very least we should detect xml parse errors and show a message to the user, rather than dumping them into an empty or partially-complete room. There's also the option of switching to a pure-js XML parser, but this would make XML parsing slower across the board.
Another option worth considering is the idea of running the XML through an XSLT transform before trying to parse it. It may be possible to write an XSLT rule which will strip these duplicates - or it's possible that it will just fail to run because the XML is invalid.
The text was updated successfully, but these errors were encountered: