-
Notifications
You must be signed in to change notification settings - Fork 0
LabelledEntriesXSLT
The plugin
de.wwu.scdh.teilsp.extensions.LabelledEntriesXSLT
is
used to generate completion suggestions via XSLT.
Required: The path to the XSLT script. This must be a valid URL. Use
the right editor variables to get such an URL,
e.g. ${pdu}/resources/xsl/witnesses.xsl
to point to
resources/xql/witnesses.xsl
relative to your project directory URL.
Optional: Arbitrary external variables passed to your Xslt script. This has the form
VARIABLE1_NAME=VALUE1,VARIABLE2_NAME=VALUE2
Optional: The local name of the XSLT template to call.
Optional: The prefix of the Xslt template to call.
Optioal: The namespace of the template to call.
-
The plugin calls a template with the arity 0 (no arguments).
-
By default it is
obt:generate-entries()
, where the prefixobt
is bound tohttp://scdh.wwu.de/oxbytei
. -
The name of this template can be choosen by plugin arguments.
-
The template must return
map(xs:string, xs:string)*
, i.e. a sequence of maps, where keys and values are strings. Cf. Saxonica's documentation of maps. -
There should (must) be a key named
key
and a key namedlabel
for the key and label of the labelled entries. -
See witnesses.xsl to get an idea.
<plugin>
<class>de.wwu.scdh.teilsp.extensions.LabelledEntriesXSLT</class>
<type>de.wwu.scdh.teilsp.services.extensions.ILabelledEntriesProvider</type>
<configurations>
<configuration>
<conditions>
<condition domain="context">self::*:lem | self::*:rdg</condition>
<condition domain="priority">10</condition>
<condition domain="nodeName">wit</condition>
<condition domain="nodeType">attributeValue</condition>
</conditions>
<arguments>
<argument name="script">${pdu}/resources/xsl/witnesses.xsl</argument>
<argument name="parameters">witness-catalog=${pdu}/WitnessCatalogue.xml</argument>
</arguments>
</configuration>
</configurations>
</plugin>