[LibX] Re: Multiple options (indexes) for type=bookmarklet

LibX Project libx.org at gmail.com
Sun Aug 20 19:37:11 EDT 2006


This email describes how LibX supports a more flexible syntax for its
bookmarklets. Those of you who have an interest in supporting
resources as bookmarklets that require a richer syntax than what is
currently provided are welcome to read further and help develop the
final syntax.

I've added two constructs to LibX's bookmarklet syntax.

1. %term1, %term2, etc. If present in a bookmarklet's URL, these are
replaced with the first, second, etc. search terms. If there are fewer
search terms than %termN terms, the remaining ones are replaced with
an empty string.

2. A switch statement.  Example: %SWITCH{%type1}{t:KT}{d:KS}{sot:TV}{soi:IV}
If the search type of the first search term is 't' - that is, "Title",
this evaluates to "KT", if the type is 'd', this becomes "KS", etc.
etc.  No "default" or wildcard branch is currently supported. The
switch argument may be either %typeN or %termN.

See http://libx.org/libx/src/editions/libxtestedition.php?edition=umich
for an example use.

This proposal allows the construction of URLs where parts or all
depend on a search option selected.

It doesn't allow us to express such constraints as "all fields must be
of the same search type" - as is the case in the "Electronic Journal &
Newspaper" resource at UMich.

It could be extended in various obvious ways, which we would do if required.

Comments welcome.

 - Godmar


More information about the Libx mailing list