command line xpath

Are you missing a feature? Request its implementation here.
Dirk.Becker
Posts: 8
Joined: Wed Oct 13, 2010 9:31 am

command line xpath

Post by Dirk.Becker »

From my Version 10.0 oxygenMac.sh I know command line arguments to specify file and schema. It would be helpful to also have an xpath so that the first match is selected.

Even better would be the equivalent feature via AppleEvent, so that a running instance could be remote controlled from a different program.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: command line xpath

Post by adrian »

Hello,

I'm afraid I do not see a common use case for the command line XPath feature request, so I don't see this being implemented.

Also, the AppleEvent feature is even less likely to be implemented. This is a completely platform dependent feature while Oxygen is a cross-platform application.

What are you using Oxygen for?
And what are you attempting to do with it that you would require these features?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Dirk.Becker
Posts: 8
Joined: Wed Oct 13, 2010 9:31 am

Re: command line xpath

Post by Dirk.Becker »

The use cases are with data and configuration files processed by a faceless program (e.g. Adobe InDesign Server). When I encounter an error within these files that can not be caught by schema-based validation, I would open the offending file and position the oXygen editor on the exact error position.

Similar use cases with InDesign Desktop (rather than Server) whose XML editing capabilities in the UI are less than stellar. I would like to sync any selection position within the DTP / layout side to the matching XML element in oXygen as external editor. Of course that would only work via inter-process communication, not command line.

As for cross-platform applications, there are some that do support the inter process communications features of their hosting environments, but I understand you are bound by the shortcomings of Java. In that case it should still be possible to listen to some socket, though. Your choice of SOAP, REST and so forth.

Regards,
Dirk
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: command line xpath

Post by adrian »

I'm sorry but this use case really doesn't fall in a category that we would consider common use case for Oxygen.

However, you could develop an Oxygen plugin in Java that can do what you need, even keep an open port and excute given commands.

The Oxygen plugins SDK(OxygenPluginsDevelopmentKit.zip) and documentation can be found here:
http://www.oxygenxml.com/developer.html#Plugins
The most comprehensive plugin sample is "CustomWorkspaceAccessPluginExtension".

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
markproxy
Posts: 1
Joined: Thu Dec 23, 2010 10:45 pm

Re: command line xpath

Post by markproxy »

I would also find it useful to be able to provide an XPath query on the command line. The usage scenario: I have an application which displays XML data in a custom format, in readonly mode. For advanced users who want to drill down to the raw XML in an editor, I would like to provide an "external tools" feature which launches whatever editor the user wants to use. When setting up the external tool, the user would provide the path to their editor, along with command-line parameters, such as {$lineNumber} or {$elementXPath}. In order for this to work with Oxygen, Oxygen's command line needs to accept either a line number or an XPath query.

If there is a way for an Oxygen plugin to access command-line parameters on startup, and use this to navigate to the desired location within the file, that would be great.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: command line xpath

Post by adrian »

Hello,

We'll consider adding this feature in a future version of Oxygen, but like I said before this is not a common use case for Oxygen so it will have a low priority. This means it could take a while before it gets implemented.

So the main point of this feature would be to implement the possibility of opening a file in Oxygen at a specified location.


Regarding the plugin support, I'm afraid plugins don't have access to the arguments from the command line.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply