XPath 3.0, simple mapping operator, and syntax highlighting
Having trouble installing Oxygen? Got a bug to report? Post it all here.
			- 
				Graydon2014
 - Posts: 17
 - Joined: Tue May 20, 2014 6:55 pm
 
XPath 3.0, simple mapping operator, and syntax highlighting
Post by Graydon2014 »
If I connect (for example) a group of replace functions via the simple mapping operator, the syntax highlighting goes strange.
The first replace gets correct syntax highlighting; the second replace gets highlighted in attribute-value-brown, has the L character highlighted as though it were an element name, and things continue peculiar from there.
I was hoping 16.0 would fix this; there's a general issues with the highlighting going funny with long XPath expression, which might or might not be related to line breaks.
			
			
									
									
						Code: Select all
<xsl:function as="xs:string" name="d:charReplace">
        <xsl:param name="inString" as="xs:string" />
        <xsl:sequence
            select="replace($inString,'(\p{L}s)''(\p{Zs})','$1’$2')
            !replace(.,'(\p{L})''(\p{L})','$1’$2')
            !replace(.,'''([^"'']+)''','‘$1’')
            !replace(.,'"([^"]+)"','“$1”')
            !replace(.,'"','“')
            !replace(.,'\p{Zs}*[‒–—]\p{Zs}*',' — ')
            !replace(.,'([\.\?!]_?)\p{Zs}+','$1 ')
            !replace(.,'\p{Zs}*\.\.\.\p{Zs}*','…')"
         />
    </xsl:function>
I was hoping 16.0 would fix this; there's a general issues with the highlighting going funny with long XPath expression, which might or might not be related to line breaks.
- 
				adrian
 - Posts: 2894
 - Joined: Tue May 17, 2005 4:01 pm
 
Re: XPath 3.0, simple mapping operator, and syntax highlight
Hi,
We were not aware of this particular problem.
I can confirm that this problem is triggered by the line breaks from the XPath expression.
I have logged this to our issue tracking tool. This will be analyzed and resolved in a future version of Oxygen.
Regards,
Adrian
			
			
									
									We were not aware of this particular problem.
I can confirm that this problem is triggered by the line breaks from the XPath expression.
I have logged this to our issue tracking tool. This will be analyzed and resolved in a future version of Oxygen.
Regards,
Adrian
Adrian Buza
<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
- 
				Graydon2014
 - Posts: 17
 - Joined: Tue May 20, 2014 6:55 pm
 
Re: XPath 3.0, simple mapping operator, and syntax highlight
Post by Graydon2014 »
Thank you!adrian wrote:I have logged this to our issue tracking tool. This will be analyzed and resolved in a future version of Oxygen.
It would be good if the format-and-indent was aware of line breaks in long XPath expressions in attributes, too; a coding team has to be very careful about all having the exact same settings to avoid messing those up into illegibility.
- 
				adrian
 - Posts: 2894
 - Joined: Tue May 17, 2005 4:01 pm
 
Re: XPath 3.0, simple mapping operator, and syntax highlight
Hi,
I tested but could not identify a format and indent problem for attributes with the default formatting options.
By default Oxygen preserves line breaks in attributes (Preferences, Editor > Format > XML ,'Preserve line breaks in attributes'), so it won't affect the line breaks from long XPath expressions that span across multiple lines.
Regards,
Adrian
			
			
									
									I tested but could not identify a format and indent problem for attributes with the default formatting options.
By default Oxygen preserves line breaks in attributes (Preferences, Editor > Format > XML ,'Preserve line breaks in attributes'), so it won't affect the line breaks from long XPath expressions that span across multiple lines.
Regards,
Adrian
Adrian Buza
<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
			
				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