| Summary: | FILESAVE: Processing Instructions Stripped from XML | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Russell Harper <russell.s.harper> |
| Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | normal | CC: | dtardon, russell.s.harper |
| Priority: | medium | ||
| Version: | 4.1.0.4 release | ||
| Hardware: | Other | ||
| OS: | Linux (All) | ||
| Whiteboard: | BSA | ||
| Crash report or crash signature: | Regression By: | ||
|
Description
Russell Harper
2013-07-29 15:17:58 UTC
(In reply to comment #0) > Steps to reproduce: > ... > 3. Update content.xml Meant: 3. Update content.xml in the ODT > According to http://www.w3.org/TR/2008/REC-xml-20081126/#sec-pi, "processing
> instructions MUST be passed through to the application."
I understand this as "a conforming XML processor must pass PIs to the application". The application is still free to ignore them.
Of note, http://www.w3.org/TR/2008/REC-xml-20081126/#sec-starttags (see production [43]) PIs are defined as legal content. While the application need not interpret PIs, they are defined as content, so it would seem that they should be preserved when the document is resaved? (In reply to comment #3) > Of note, http://www.w3.org/TR/2008/REC-xml-20081126/#sec-starttags (see > production [43]) PIs are defined as legal content. This is a description of structure. PIs are element 'content' as they can appear inside an element. (Note that comments are 'content' too. And so are CDATA sections. I do not think you will argue that CDATA sections must be preserved exactly as they are.) It has nothing to do with semantics. > > While the application need not interpret PIs, they are defined as content, > so it would seem that they should be preserved when the document is resaved? No, it would not seem (see above). Anyway, it looks like the authors of XSLT agree with my interpretation, because PIs are discarded by the built-in rules (therefore, I guess 99.9 % of existing stylesheets discards them). Behaviour is as designed - CDATA sections, comments, & PIs are stripped from source XML prior to saving. |