Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 2.98 KB

README.md

File metadata and controls

32 lines (19 loc) · 2.98 KB

LdWidget

Introduction:

The LdWidget is a versatile tool designed to execute SPARQL queries effortlessly. It offers flexibility by allowing users to specify a SPARQL endpoint URL, a query, and an optional button label. Integration is seamless through iframe embedding, with parameters encoded as query parameters in the URL.

Usage:

To utilize the LdWidget, simply include it as an iframe in your web page. Set the src attribute of the iframe to the URL of the widget, with the parameters encoded as query parameters. It's important to note that all parameters must be URL encoded.

Configuration:

For enhanced development convenience, append /config to the URL of the widget. This triggers the display of a configuration form, simplifying the process of entering the SPARQL endpoint URL, the query, and the optional button label in a user-friendly manner. This feature eliminates the need for manual query encoding. However, it's worth mentioning that the configuration dialog is intentionally kept minimalistic and may lack aesthetic appeal.

Parameters:

  • q: The SPARQL query to execute.
  • endpoint: The URL of the SPARQL endpoint.
  • b (optional): The button label.

Here is a configuraiton dialog example url: Example Config

Where is it used?

Request for rabies titre verification

You can check whether a rabies antibody test that has been carried out by the Swiss Rabies Center is valid, provided you have the laboratory report.

https://www.ivi.admin.ch/ivi/en/home/tollwutzentrale/tollwut-widget.html

Example

Check the src/example.html file for an example of how to use the widget.