custom framework, file extension, xpath search project resources

<oXygen/> general issues.
bwbohl
Posts: 23

custom framework, file extension, xpath search project resources

Mon Jan 23, 2017 12:46 pm

Hi everybody,

I'm currently creating a custom framework for Document Type Association in oXygen XML Editor. I defined two association rules, one relying on the namespace, the other on the filename extension – which in my use case often is custom, too, let's say ".xyz".

oXygen already recognises a "xml-file.xyz" as XML and doesn't ask for the file-type on opening the file.

The Problem now is using the XPath Query field on "project resources". When I select a folder containing multiple ".xyz"-files it returns a query error telling me:

"Could not execute XPath operation.
There are no XML files in the selected XPath scope."

Any help appreciated!
Thanks
=====
oXygen XML Editor v18.1
macOS Sierra 10.12.6
Radu
Posts: 5752

Re: custom framework, file extension, xpath search project resources

Mon Jan 23, 2017 4:35 pm

Hi,

I will add an internal issue to try and see if we can remove this limitation and consider your extension as an XML file extension as it is defined in the document type association as a file pattern.
In the meantime you can go to the Oxygen Preferences->File Types page and add a mapping with your extension and the XML Editor content type.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 23

Re: custom framework, file extension, xpath search project resources

Mon Jan 23, 2017 7:00 pm

Dear radu,

that already helped to make it work.
Now concerning custom frameworks and file extensions:

If it's not possible to consider a custom file extension as XML file extension programmatically maybe it is possible to add a file type when "installing" a framework?
I just want to avoid any extra steps for my potential users when using my framework ;-)
Last edited by bwbohl on Wed May 17, 2017 5:03 pm, edited 1 time in total.
=====
oXygen XML Editor v18.1
macOS Sierra 10.12.6
Radu
Posts: 5752

Re: custom framework, file extension, xpath search project resources

Tue Jan 24, 2017 9:05 am

Hi,

These are all the options you have to share custom settings with others:

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/topics/sharing-possibilities.html

Unfortunately a framework configuration cannot impose global application-wide settings.
A plugin could do that by calling our API. We have plugins which are called when the application is started and they can impose those settings.
A sample plugin which imposes options can be found here:

https://github.com/oxygenxml/wsaccess-javascript-sample-plugins

The plugin is based on this extension:

https://www.oxygenxml.com/doc/versions/18.1/ug-author/concepts/workspace-access-plugin-js.html

So end users would need to install on their side both a plugin and a framework.
Frameworks and plugins can be elegantly shared using our add-ons mechanism:

https://www.oxygenxml.com/doc/versions/18.1/ug-author/topics/packing-and-deploying-addons.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 23

Re: custom framework, file extension, xpath search project resources

Tue Jan 24, 2017 10:31 am

Hi,

many thanks for pointing those out!
I'll be investigating ;-)

oXygen support rocks!
=====
oXygen XML Editor v18.1
macOS Sierra 10.12.6

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 3 guests