Page 1 of 1

custom framework, file extension, xpath search project resources

Posted: Mon Jan 23, 2017 12:46 pm
by bwbohl
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

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

Posted: Mon Jan 23, 2017 4:35 pm
by Radu
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

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

Posted: Mon Jan 23, 2017 7:00 pm
by bwbohl
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 ;-)

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

Posted: Tue Jan 24, 2017 9:05 am
by Radu
Hi,

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

https://www.oxygenxml.com/doc/versions/ ... ities.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-j ... le-plugins

The plugin is based on this extension:

https://www.oxygenxml.com/doc/versions/ ... in-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/ ... ddons.html

Regards,
Radu

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

Posted: Tue Jan 24, 2017 10:31 am
by bwbohl
Hi,

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

oXygen support rocks!