Page 1 of 1

Problem with syntax coloring in XPath expression in XSLT stylesheet

Posted: Tue Aug 02, 2016 11:27 am
by Martin Honnen
I am using XML Editor 18.0, build 2016062718 on Windows 10 and today I have created an XSLT stylesheet in the editor where part of an XPath expression inside of a select attribute is colored in red, it looks odd to me.
The XSLT code is

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="xs date" version="1.0">

<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="*[not(*) and string-length() > 19 and date:date() != '']">
<xsl:copy>
<xsl:value-of select="date:format-date(date:date(.), "yyyy-MM-dd'T'HH:mm:ssZ")"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>
and then in the select attribute of the value-of the last part :ssZ") is colored red: Image

That looks like a bug or at least quirk in the syntax coloring to me.

Re: Problem with syntax coloring in XPath expression in XSLT stylesheet

Posted: Tue Aug 02, 2016 11:55 am
by Radu
Hi Martin,

Thanks for the report, it is a bug on our side. We added an internal issue for it and we'll try to resolve it in Oxygen 18.1 (Autumn this year).

Regards,
Radu