URI Templates

Originally based on Joe Gregorio’s URI Templates idea, FURI is an implementation of a URI Template processor which can also be used for URI pattern matching.

We have used this in a number of projects including our flagship product PageSeeder as well as Berlioz - our Open Source Web framework.

We will try to keep Furi up to date with the latest draft of the URI Template specifications .

What is a URI Template?

In brief, it is a notation which can be used to generate a valid URI from a template and a set of parameters.

A common use case is when a client wants to produce a URI to access a service (e.g. OpenSearch )

For example:

Template Expansion

Furi for pattern matching

While the URI templates are not designed for pattern matching, we found that there were situations when it is practical to use the same notation for both pattern matching and template expansion.

We’ve included in Furi a mechanism to match URIs and resolve parameters that use the same notation. The process to match patterns and resolves variables is described URI Pattern Process.

Source and documentation

 

Created on , last edited on