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.
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.
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.
- 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
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
Check the src/example.html
file for an example of how to use the widget.