Open DALDEI opened 9 years ago
Hi,
I do not understand what example .xqy file you are referring to.
This plugin automatically creates an XQuery file, after the plugin is created with Oxygen.
Can you give me some details?
Claudius
With one framework when I use "Edit" I get this document
xquery version "3.0";
import module "http://expath.org/ns/user-agent";
declare namespace ua = "http://expath.org/ns/user-agent";
declare namespace oxy = "http://oxygenxml.com/extensions/author";
declare variable $ua:document := /;
()
That led me to looking around on your sites (http://kuberam.ro/oxygen-addon-builder/) until I found a sample document: https://docs.google.com/document/d/1DWKic-uH5vay0qZRcUXLfGclgYIoFDA2PEUb-LXYPXU/edit
--- Then I found that using Edit on a different framework produced the same sample
xquery version "3.0";
import module "http://expath.org/ns/user-agent";
declare namespace ua = "http://expath.org/ns/user-agent";
declare namespace oxy = "http://oxygenxml.com/extensions/author";
declare variable $ua:document external;
declare variable $oxy:caret-position external;
declare variable $oxy:selection external;
declare variable $oxy:selection-parent external;
ua:action(
"XQueryOperation",
map {
"name" := "XQueryOperation"
},
insert node doc('content-models/def.xml') after def[last()]
),
ua:action(
"InsertFragmentOperation",
map {
"name" := "InsertFragmentOperation"
},
insert nodes (<node1>content1</node1>, <node2>content2</node2>) after element()[last()]
)
Either case, if I "validate" in Oxygen I get this error:
System ID: /home/dlee/Oxygen XML Editor 17/frameworks/mml/addon.xq Main validation file: /home/dlee/Oxygen XML Editor 17/frameworks/mml/addon.xq Engine name: Saxon-PE XQuery 9.6.0.5 Severity: fatal Description: XQST0059: Failed to resolve URI of imported module: Cannot locate module for namespace http://expath.org/ns/user-agent Start location: 7:0
I have searched the install directory, my filesystem and the internet and cannot find an xquery module for that namespace. I did find the W3C spec page for it
http://claudius108.users.sourceforge.net/specs/expath/user-agent/user-agent.html
Hi,
So, the first step would be http://kuberam.ro/oxygen-addon-builder/#framework-creation, followed by http://kuberam.ro/oxygen-addon-builder/#framework-editing.
You said you arrived to the step of editing a framework (the second step mentioned above).
When the sample addon.xq file is opened, by pressing the Edit button and selecting the framework you want to edit, you just need to add to that file HTML templates, actions, etc., as you need and as it is indicated at http://kuberam.ro/oxygen-addon-builder/#html-templates and below.
There is not need to validate the addon.xq file in Oxygen, as it is not valid as to importing of that module (I hope I will fix this validation error soon).
All you need is to fill in the addon.xq file, and press the Generate button every time you need to check your framework by using a sample file.
I am following this approach for an addon.xq file that has more than 3000 lines on code (tens of HTML templates, tens of actions, etc.), so I can assure you that it works.
Claudius
I installed this addon in Oxygen 17.0 The example .xqy files reference
import module "http://expath.org/ns/user-agent";
I cannot find this module anywhere (I did find the W3C spec but not an implementation).
I get these errors in validation
System ID: /home/dlee/Oxygen XML Editor 17/frameworks/mml/addon.xq Main validation file: /home/dlee/Oxygen XML Editor 17/frameworks/mml/addon.xq Engine name: Saxon-PE XQuery 9.6.0.5 Severity: fatal Description: XQST0059: Failed to resolve URI of imported module: Cannot locate module for namespace http://expath.org/ns/user-agent Start location: 7:0
System ID: /home/dlee/Oxygen XML Editor 17/frameworks/mml/addon.xq Main validation file: /home/dlee/Oxygen XML Editor 17/frameworks/mml/addon.xq Engine name: Saxon-PE XQuery 9.6.0.5 Severity: fatal Description: XPST0003: Unexpected token "insert nodes" in path expression Start location: 17:0 URL: http://www.w3.org/TR/xpath20/#ERRXPST0003