bcdh / tei-completer Goto Github PK
View Code? Open in Web Editor NEWA highly customizable plugin for setting up and activating remote-driven autocompletions of attribute values in the oXygen XML Editor.
License: GNU General Public License v2.0
A highly customizable plugin for setting up and activating remote-driven autocompletions of attribute values in the oXygen XML Editor.
License: GNU General Public License v2.0
My config:
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://humanistika.org/ns/tei-completer">
<server>
<baseUrl>https://some-endoint</baseUrl>
</server>
<autoComplete>
<context>//rs</context>
<attribute>@ref</attribute>
<dependent default="person">@type</dependent>
<selection>@n</selection>
<request>
<url>$baseUrl/$dependent?q=$selection</url>
</request>
</autoComplete>
</config>
In this example selection
uses @n as placeholder for the search query.
The text()
method usually does not apply since the text varies from the required search query.
The initial plan was to use @ref for the query in selection
with the desired outcome that I can overwrite @ref value with autocomplete proposals. Unfortunately this does not work.
Is there another way besides using text()
or a placeholder attribute?
If the configuration file has multiple autocomplete contexts, like this:
<autoComplete>
<context>//w</context>
<attribute>@lemma</attribute>
<selection>./text()</selection>
<request>
<url>$baseUrl/forms/$selection</url>
</request>
<response>
<transformation>getLemmaOutput.js</transformation>
</response>
</autoComplete>
<autoComplete>
<context>//rs[@type='place']</context>
<attribute>@corresp</attribute>
<selection>./text()</selection>
<request>
<url>$baseUrl/entities/places/$selection</url>
</request>
<response>
<transformation>getPlaceOutput.js</transformation>
</response>
</autoComplete>
the custom lookup will not always respect the context from which it was called.
Let's say the user calls up a custom look from <w>
and tries to autocomplete on @lemma
. Then:
$baseUrl/forms/$selection
and the second two results are from $baseUrl/entities/places/$customLookup
$baseUrl/forms/$customLookup
), but see also #17Please make sure that the custom lookups only use the one lookup url for the given context.
Hello. I have an issue with the request url when there is a whitespace in the selection input. I hope someone can help!
My config:
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://humanistika.org/ns/tei-completer">
<server>
<baseUrl>https://my-endpoint-url</baseUrl>
</server>
<autoComplete>
<context>//rs</context>
<attribute>@ref</attribute>
<dependent default="person">@type</dependent>
<selection>@n</selection>
<request>
<url>$baseUrl/$dependent/?q=$selection</url>
</request>
</autoComplete>
</config>
Example repsonse url (does not work):
https://my-endpoint-url/dependent/?q=input string
if the "input string" contains a whitespace I receive this error:
14:24:57.894 [AWT-EventQueue-0] ERROR org.humanistika.oxygen.tei.completer.remote.impl.JerseyClient - Illegal character in query at index 76: https://my-endpoint-url/dependent/?q=input string
java.net.URISyntaxException: Illegal character in query at index 76: https://my-endpoint-url/dependent/?q=input string
Example response url (works):
https://my-endpoint-url/dependent/?q=input%20string
If I manually add the unicode for whitespaces it works.
Is there a way to pre-transform the input in the config?
Or can you fix this in your client?
At the moment, when the user clicks on the "search" button in the Custom lookups window, the results are added to the results that have been previously displayed by autosuggest.
Please change this so that the search button will clear the previous results on click, before displaying the results of its own search action.
Hello,
with the newest version 25 of Oxygen the TEI-Completer blocks the attribute autocompleter assistant of custom frameworks.
Here is more information about it in the Oxygen Forum:
https://www.oxygenxml.com/forum/common-problems/topic25094.html
Could you please investigate and provide a potential fix?
Thank you!
At the moment, the Completer will not display a "Custom entry" link if the api returned results.
This is not ideal because there could be cases where the matched selection is wrong, and the user would like to perform a manual search with a different string.
Would you be able to change this to include a custom lookup link on every autocomplete?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.