JCooney.NET

Joseph Cooney's Weblog

My Links

Blog Stats

News

I work for:


see also:
Dominic Cooney
Patrick Cooney

Archives

Image Galleries

My GotDotNet Samples

Syntax Hilighting XPath Expressions

I love XPath. My first GotDotNet sample was an XPath expression tester. It is a very simple application. It can be quite helpful when working out expressions, but one thing that I always wanted to add (but never got around to) was syntax hilighting. After a while mucking around with the ROTOR XPath implementation I'm starting to be able to do the syntax hilighting.



As you can see from the screen shot I'm not actually hiligthing the text as it is typed, I'm doing that in a seperate text box for now. The eventual .plan is for it to all happen in a single text box, possibly with auto-completeion like Visual Studio Intellisense (tm). One problem with the SSCLI XPath implementation (for the use I'm putting it to anyway) is that it doesn't care about maintaining the exact text used to create the expression - it's only concerned with building an abstract syntax tree of nodes so certain things are "thrown out" during the parse. I'm not actually sure if the current way I'm going about things is going to work, but hopefully I can have fun trying. When/If I get it working I will post an update on GotDotNet.

posted on Monday, April 12, 2004 4:09 PM

Feedback

# re: Syntax Hilighting XPath Expressions 4/13/2004 10:43 AM secretGeek


Speaking of syntax highlighting... what about using some of Dominic Cooney's parsing code? I hear he is not the *worst* programmer in the family...


# re: Syntax Hilighting XPath Expressions 4/13/2004 10:47 AM JosephCooney

Yes, I'm racing to finish it before Dominic automates the whole process. On the bright side - If he keeps going the way he is I won't have to wait until ROTOR 2 to get an XQuery implementation to do syntax hilighting for me.

Title  
Name  
Url
Security Word (prevent comment spam)
Protected by FormShield
Comments