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
I'm using Saxy to parse .docx files, and I need to preserve certain entities exactly as they appear in the XML content—for instance,
(line feed) present in attributes such as o:gfxdata.
According to the documentation, the expand_entity: :never option is supposed to keep entity references literal in the output (rather than converting them to the character \n). However, in my tests,
still ends up converted or normalized, and I no longer see
in the resulting DOM structure.
Minimal example:
xml = ~s|<tag attr="Base64
MoreBase64" />|
{:ok, dom} = Saxy.SimpleForm.parse_string(xml, expand_entity: :never)
# Expected behavior: the attribute value should remain "Base64
MoreBase64".
# Actual behavior: the entity 
 seems to be turned into something else.
IO.inspect(dom)
The specification for the :never setting suggests that the entity should not be resolved, i.e., it should be emitted as
in the final structure. Is this a bug, or is there an internal XML normalization step affecting line feeds in attributes?
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered:
Hello,
I'm using Saxy to parse .docx files, and I need to preserve certain entities exactly as they appear in the XML content—for instance, (line feed) present in attributes such as o:gfxdata.
According to the documentation, the expand_entity: :never option is supposed to keep entity references literal in the output (rather than converting them to the character \n). However, in my tests, still ends up converted or normalized, and I no longer see in the resulting DOM structure.
Minimal example:
The specification for the :never setting suggests that the entity should not be resolved, i.e., it should be emitted as in the final structure. Is this a bug, or is there an internal XML normalization step affecting line feeds in attributes?
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: