<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I was thinking about how to do some testing of the dynamic metadata
    provider.  Ideally I wanted to just use a plain web server, without
    the complexity of a "metadata service app" sitting in the middle. 
    E.g. I wanted to use a template-based URL builder with a template
    something like <a class="moz-txt-link-rfc2396E" href="https://www.example.org/metadata/${entityID}.xml">"https://www.example.org/metadata/${entityID}.xml"</a>.<br>
    <br>
    Problem is of course that many entityIDs have '/'  and possibly
    other characters in them that are not legal filename characters on
    most platforms and filesystems.  So I hit upon the idea of wanting
    to transform the entityID in some way, and realized that this is
    probably generally useful in the real world.  It allows for the
    possibility of a simple, poor man's metadata "service" that is just
    a folder o' metadata on a web server.<br>
    <br>
    The template and MDQ request URL builders now support an optional
    Function&lt;String,String&gt; transform function.  Since the main
    obvious transform route is hashing, I also added in java-support a
    new StringDigester impl of that which takes a String, digests it
    using a specified digest algorithm, and then outputs in the
    specified format, either Base64 or hexadecimal (either lower or
    upper case).<br>
    <br>
    That then allows for example an entityID of
    <a class="moz-txt-link-rfc2396E" href="https://www.example.org/sp">"https://www.example.org/sp"</a> and a template of
    <a class="moz-txt-link-rfc2396E" href="https://www.example.org/metadata/${entityID}.xml">"https://www.example.org/metadata/${entityID}.xml"</a> to resolve to:<br>
    <br>
<a class="moz-txt-link-freetext" href="https://www.example.org/metadata/08ced64cddc9f1578598b2cf71ae747b11d11472.xml">https://www.example.org/metadata/08ced64cddc9f1578598b2cf71ae747b11d11472.xml</a><br>
    <br>
    using SHA-1 and hex output.<br>
    <br>
    For the same filesystem reasons, I think this transform approach
    would also have to be used in a hypothetical local filesystem
    "folder of metadata" approach that was dynamic, such as I mentioned
    on the last dev call.  This would have the advantage of dynamically
    picking up new files that were dropped into the directory while the
    system was running.<br>
    <br>
    For the MDQ request builder, the same transform function can be used
    to issue queries using the defined "{sha1}..." identifier format, if
    that is desirable vs the original entityID for some reason (I did a
    specific function that handles that case), or could do other
    transforms with the entityID as the spec progresses.<br>
    <br>
    Just thought I'd share.<br>
    <br>
    --Brent<br>
    <br>
    <br>
  </body>
</html>