Error "Could not insert document fragment" in Oxygen 25
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 19
- Joined: Tue Aug 22, 2017 5:43 pm
Error "Could not insert document fragment" in Oxygen 25
Post by Martin de la Iglesia »
I have configured an Author action that inserts content from another XML file using a XSLTOperation and the Replace action. This works fine up to including Oxygen Editor version 24. In v. 25 however, when this action is executed, I get the error message "Could not insert document fragment. Cause: The entity name must immediately follow the '&' in the entity reference" when there is an & in the text node to be inserted. (When the ampersand in the source document is followed by a letter, e.g. "&cetera" (&cetera) the error message reads: "Could not insert document fragment. Cause: The reference to entity 'cetera' must end with the ';' delimiter.")
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Error "Could not insert document fragment" in Oxygen 25
Post by chrispitude »
Hi Martin,
Just curious - if you double-encode the ampersand, does it work?
Just curious - if you double-encode the ampersand, does it work?
Code: Select all
&cetera
-
- Posts: 19
- Joined: Tue Aug 22, 2017 5:43 pm
Re: Error "Could not insert document fragment" in Oxygen 25
Post by Martin de la Iglesia »
Yes, &cetera would produce the desired result and throws no error.
-
- Posts: 19
- Joined: Tue Aug 22, 2017 5:43 pm
Re: Error "Could not insert document fragment" in Oxygen 25
Post by Martin de la Iglesia »
Of course, double-encoding the ampersands or otherwise altering the source XML document is not a feasible solution to this problem.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error "Could not insert document fragment" in Oxygen 25
Hi Martin,
Thanks for the report, this report is similar to:
viewtopic.php?p=70662#p70662
Sorry for the inconvenience, I will try to add a new parameter to the XSLTOperation to control this behavior Oxygen has when it comes to interpreting entity references in the next Oxygen 25.1 minor bug fix release, probably in about a month. I will update this forum thread when a fix is available.
Regards,
Radu
Thanks for the report, this report is similar to:
viewtopic.php?p=70662#p70662
Sorry for the inconvenience, I will try to add a new parameter to the XSLTOperation to control this behavior Oxygen has when it comes to interpreting entity references in the next Oxygen 25.1 minor bug fix release, probably in about a month. I will update this forum thread when a fix is available.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 19
- Joined: Tue Aug 22, 2017 5:43 pm
Re: Error "Could not insert document fragment" in Oxygen 25
Post by Martin de la Iglesia »
OK, thank you, Radu. I'm looking forward to that release then.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error "Could not insert document fragment" in Oxygen 25
Hi,
We made a minor Oxygen 25.1 bug fix release which adds a parameter to control this behavior:
https://www.oxygenxml.com/build_history.html#2023070306
Radu
We made a minor Oxygen 25.1 bug fix release which adds a parameter to control this behavior:
https://www.oxygenxml.com/build_history.html#2023070306
Regards,Author: Added a new parameter named escapeEntityRefs to the TransformOperation Author operation to control if entity references are escaped as plain text in the processed content.
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 19
- Joined: Tue Aug 22, 2017 5:43 pm
Re: Error "Could not insert document fragment" in Oxygen 25
Post by Martin de la Iglesia »
Thank you, Radu. I can confirm that it works now once I set the parameter to 'false'.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service