Some suggestions for XPathView

1. Add the Evaluate XPath command to the Search menu.
2. Add the Show XPath command to the View menu.
3. Extend Evaluate XPath's history to something like a library where one
can select from a tree of categorised and named expressions.
4. Improve the editing field for the expression to be multi-line and
provide syntax highlighting and completion of XPath functions.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

2 comments
Comment actions Permalink

Gordon Tyler wrote:

1. Add the Evaluate XPath command to the Search menu.
2. Add the Show XPath command to the View menu.
3. Extend Evaluate XPath's history to something like a library where one
can select from a tree of categorised and named expressions.
4. Improve the editing field for the expression to be multi-line and
provide syntax highlighting and completion of XPath functions.


Good list of suggestions. #1 and #2 are no-brainers, for #3 I could use some input about
what expressions you'd like to have in the library. From the top of my head there are only

Any tag: //*
Any attribute: //@*
All elements with content 'foo': //*

Any other ideas?

#4 is certainly the most advanced one, but maybe the new Language API can be utilized
here. I'll investigate this and give it a try when I get a chance to.

Something else I've been thinking of is the possibility to modify a document using XPath,
like selecting a list of elements and being able to rename or delete them, either totally,
just the matching element or its content, etc. Something like a very specific Structural
Search & Replace variant. Do you think something like this would be useful? I'd have to
come up with a good UI though, which I haven't had a good idea for yet.

Thanks for the feedback.

Sascha

0
Comment actions Permalink

Sascha Weinreuter wrote:

Good list of suggestions. #1 and #2 are no-brainers, for #3 I could use
some input about what expressions you'd like to have in the library.


I wasn't thinking of providing a default library of expressions, but
more the ability to save my own expressions with a name and in a
category. That way I can select a particularly useful expression from my
library and execute it as is or perhaps refine it slightly and then
execute it.

Something else I've been thinking of is the possibility to modify a
document using XPath, like selecting a list of elements and being able
to rename or delete them, either totally,
just the matching element or its content, etc. Something like a very
specific Structural Search & Replace variant. Do you think something
like this would be useful? I'd have to come up with a good UI though,
which I haven't had a good idea for yet.


I actually thought of that a little while after I posted this list but I
was too busy to post again. 8) It's a pretty hardcore task though. Dare
I say, it's rather like XSLT. You could probably do something simple
like changing tag names or deleting tags, but anything more complicated
than that is going to require some sort of transformation language.

The changes I was making to my XML would definitely have required some
transformation lanaguage. The steps were basically like this:

1. Find the next tag which matches.
2. Surround with a tag and then surround that with another tag.
3. Duplicate the original tag within these two nested tags.
4. Modify an attribute value in the two duplicates.

Another thing I just thought of is that it would be nice if a Find
Usages-like result window could be provided. The highlights are all too
easy to lose if one is editing each matching tag and one presses Escape
to clear a selection; it clears the highlighted tags as well.

BTW, I'm using XPathView on a 10,000 line file with a nested structure
10-15 levels deep and it's performance is quite fine 8)

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

0

Please sign in to leave a comment.