Message

foo is not a valid URN

Explanation

Value is not a valid URN, as defined by RFC 2141.

Solution

URNs have very picky syntax requirements. A common problem is trying to use domain names as namespace identifiers in URNs. For example, this is an invalid URN:

urn:feeds.archive.org:validator:1

This is a valid URN:

urn:feeds-archive-org:validator:1

Note that the periods in the domain name have been replaced by dashes.

If this is not your problem, try reading RFC 2141. It's quite short. Section 2.1 talks about what's allowed in namespace identifiers (immediately after the "urn:" part); section 2.2 talks about what's allowed in the rest of it.

Not clear? Disagree?

You might be able to find help in one of these fine resources.