Skip to content
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

XML attribute normalization is missing #288

Open
bubnikv opened this issue Mar 1, 2022 · 1 comment
Open

XML attribute normalization is missing #288

bubnikv opened this issue Mar 1, 2022 · 1 comment
Assignees

Comments

@bubnikv
Copy link

bubnikv commented Mar 1, 2022

lib3mf could read the XML attribute values it writes, however it seems to not implement XML attribute normalization:
https://www.w3.org/TR/REC-xml/#AVNormalize

Namely, if a XML attribute value contains newlines or tabs, these newlines or tabs are replaced by libexpat by spaces after parsing and before passing to an application due to the mandatory normalization as shown by the following table from the XML norm:

image

Please note that an attribute type is considered CDATA by default.

@bubnikv
Copy link
Author

bubnikv commented Mar 1, 2022

And by the way, none of the XML parsers / writers that I checked (boost property tree, boost serialization, tinyxml) seem to implement normalization.

Also if a producer escapes newlines with &#xD, it seems that lib3mf will NOT unescape such sequence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants