XSLT text value template within CDATA
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 7
- Joined: Wed Mar 20, 2013 9:12 pm
XSLT text value template within CDATA
In the Oxygen XSLT editor, there is no syntax-highlighting or other XPath related features for XPath within text-value-templates - when they are embedded within a CDATA section. This looks like a bug.
Last edited by pgfearo on Thu May 08, 2025 1:45 pm, edited 1 time in total.
-
- Posts: 144
- Joined: Tue Mar 25, 2003 11:21 am
Re: XSLT text value template within CDATA
Hello,
A small sample will be very helpful,
Thanks,
Mircea
A small sample will be very helpful,
Thanks,
Mircea
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Wed Mar 20, 2013 9:12 pm
Re: XSLT text value template within CDATA
Here's a screenshot of Oxygen 27.0 with XSLT including a text-value-template nested within a CDATA section:
Screenshot 2025-05-09 at 09.07.07.png
Oxygen correctly reports an error with the '$nx' variable reference in the XPath expression within the first text-value-template. Confirming that an attempt is being made to evaluate this. However, the XPath expressions have no syntax highlighting. I expect to see the expressions within the {} curly braces of the text-value-templates on lines 15 and 16 in the screenshot (repeated below) with XPath syntax highlighting. But the expressions are just coloured green.
Code: Select all
<this is in CDATA> {for $n in 1 to $max return $nx || ','}
<and this is also> {225 + $max}
You do not have the required permissions to view the files attached to this post.
-
- Posts: 83
- Joined: Wed Aug 30, 2017 3:56 pm
Re: XSLT text value template within CDATA
Hello,
Thanks for posting the screenshot.
Yes, parsing of CDATA sections is done correctly in Oxygen, but we do not provide syntax highlighting or content completion support for them.
I will log a task to further investigate how we can improve the reported situation.
But the problem is not limited to XPath expressions in CDATA, other types of content can be embedded in CDATA sections and should be considered and handled accordingly.
Regards,
Teo
Thanks for posting the screenshot.
Yes, parsing of CDATA sections is done correctly in Oxygen, but we do not provide syntax highlighting or content completion support for them.
I will log a task to further investigate how we can improve the reported situation.
But the problem is not limited to XPath expressions in CDATA, other types of content can be embedded in CDATA sections and should be considered and handled accordingly.
Regards,
Teo
Teodor Timplaru
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Wed Mar 20, 2013 9:12 pm
Re: XSLT text value template within CDATA
CDATA sections are not parsed by the XML parser, but they are parsed by the XSLT processor, because of 'text-value-templates'. So, as far as I know, no other types of content within a CDATA section, apart from 'text-value-templates' containing XPath expressions, should have syntax-highlighting in the XSLT editor. Everything else, even if it appears to have XML-like syntax, is just text and should therefore need no special auto-completion or highlighting.But the problem is not limited to XPath expressions in CDATA, other types of content can be embedded in CDATA sections and should be considered and handled accordingly.
I'd expect the syntax-highlighting to resemble something close to this:
tvt-within-cdata-oxygen.png
Is this your understanding also?You do not have the required permissions to view the files attached to this post.
-
- Posts: 83
- Joined: Wed Aug 30, 2017 3:56 pm
Re: XSLT text value template within CDATA
My comment was referring to XML content type in a broader sense. But of course, restricting the analysis to XSLT, you are probably right.
Anyway, as I already mentioned, we are going to delve deeper into the problem.
And, of course, we will update this topic, if we decide on an improvement related to this aspect.
Anyway, as I already mentioned, we are going to delve deeper into the problem.
And, of course, we will update this topic, if we decide on an improvement related to this aspect.
Teodor Timplaru
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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