Hello there!
This is another post around XQuery and IDEs. As in my earlier post I have suggested to use XQDT for XQuery IDE for building and running XQueries, In this post I am going to explain how to use XQuery in Notepad++.
I use notepad++ in my official environment a lot for editing all kinds of files including text, xml, and even XQueries. There are lot of predefined language types in Notepad++ and comes with styling of them. And of course, it looks great when styled.
For now, Notepad++ officially doesn’t include XQuery styling and hence this post!
I found the following plugin configuration for notepad++ that will just do XQuery editing easy with syntax highlighting. Trust me it will add to your code!
I am attaching below files:
1. userDefineLang.xml
2. XQuery.xml
3. XQuery.api
Follow the below steps to configure the same. [Assumption: You have installed notepad++ already )
Step 1: Copy XQuery language definition for syntax highlighting
Copy “userDefineLang.xml” to %APPDATA%\Notepad++
Step 2: Copy Query.xml and Query.api to Notepad++ Installation folder
XQuery.api and XQuery.xml to C:\Program Files(x86)\Notepad++\plugins\APIs
Once these are copied, restart Notepad++.
XQuery without formatting.
XQuery with plugin enabled from Language –> XQuery
Hope the above was useful for you.
Download the required files from HERE.
Vinay Khare says
Quiet helpful for all XQuery programmers working on super heavy applications.
One more point that I would like to add to make it support varying extensions of XQuery Language like .xqy, .xq or .xquery. To do so, we can edit the value of ext attribute of UserLang element in userDefineLang.xml file.
Say: –> will support xqy extension only
–> will support xqy xquery and xq extension
Similarly, we add any extension, just by separating it with a space.
Vinay Khare says
Quiet helpful for all the XQuery programmers working over a super heavy application.
One more point that I would like to add to make it support varying extensions of XQuery Language like .xqy, .xq or .xquery. To do so, we can edit the value of ext attribute of UserLang element in userDefineLang.xml file.
Say: UserLang name=”XQuery” ext=”xqy” –> will support xqy extension only
UserLang name=”XQuery” ext=”xqy xquery xq” –> will support xqy xquery and xq extension
Similarly, we can add any extension, just by separating it with a space.
Abhishek says
Absolutely!
Rakesh says
Thanks a lot for this helpful article.
Alexander Schäl says
Thanks! But the highlighter does not handle conditions with “less than” right. Try “if ($length < 5) then"
Alexander Schäl says
Do you have an update in the new NotePad++ v7.6.6 “UserDefinedLanguage”-Format ?