-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should explicitly support xml:space="preserve"
#74
Comments
So it seems that the cost of this feature outweighs the benefits. The linked issue in Leanify would be resolved by both xml:space=preserve support, or by using parse_ws_pcdata_single (or parse_ws_pcdata and some advanced client code that strips unused whitespace - parse_ws_pcdata_single is inadequate for e.g. XHTML parsing). Interestingly enough, the issue in tinyxml2 does not have xml:space="preserve" in the document, so it's irrelevant there - this is already served by parse_ws_* parsing flags pugixml provides. In general, for XHTML documents xml:space="preserve" won't help because it's almost never present in the documents directly. Now, there's still some value in automatic preservation of whitespace if needed. XML recommendation seems to suggest that support for this is preferred. The problem is that implementation is very involved:
Combining the implementation challenges with the fact that in most cases the applications don't seem to benefit from this means that supporting this is not worth the trouble. |
Thanks for investigating this! |
Details as to necessity at leethomason/tinyxml2#242, & JayXon/Leanify#3 (comment) & preceding.
The text was updated successfully, but these errors were encountered: