ACTION-574: proposal on prefix rewriting

The current c14n draft proposes the following for digest-based prefix
rewrite:

"Assign new prefix values "nD" to each prefix in this list where D is SHA1
digest of the URI, the digest encoded as a base64 string, and then the
base64 chars '/', '+' and '=' replaced by '_', '-' and '.' to achieve XML
name rules."

My suggestion in my comments a few weeks back was to hex-encode the SHA1
digest and add a leading underscore, but the leading n solves the problem
with digits anyway.

So my proposal amounts to:

Assign new prefix values "nD" to each prefix in this list where D is the
SHA1 digest of the URI expressed as a hexidecimal string using the
characters '0'-'9' and 'a'-'f'.

The downside obviously is the text gets longer (20 bytes encoded into base64
-> 40 characters). If there's an encoding we can use that doesn't result in
unsafe names, that's fine with me.

-- Scott

Received on Tuesday, 4 May 2010 16:10:37 UTC