allows nested replacement patterns in string/interpolate
convert toString to allow 'false'
adds support for complex namespace names