xaml - Can a XML namespace name be something other than an HTTP URI? -


the way understand it, xml namespace name can valid uri; however, seems they're always uris http:// scheme. rule, guideline, convention? can use urn:foo:bar instead?

here's specific usage scenario: want define xml namespace library of mine, make usage easier in xaml. use url of github repository, if project's home ever changes, namespace name become obsolete url (and if change it, break existing code). i'm thinking of using uri urn:myname:myproject instead.

is acceptable practice? if not, way handle fact project's home might change, making url obsolete?

"can xml namespace name other http uri?"

sure can. official documentation of 'namespaces in xml' mention criteria of namespace identifier, , in same place mention urn , url possible candidates task :

the namespace name, serve intended purpose, should have characteristics of uniqueness , persistence. not goal directly usable retrieval of schema (if exists). example of syntax designed these goals in mind uniform resource names [rfc2141]. however, should noted ordinary urls can managed in such way achieve these same goals.

so, long uri you're going use carries recommended characteristics, acceptable practice use it.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -