I have stylesheets and schemas that uses namespaces
e.g.
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:abc="http://development.com">
But when placing them onto the production server I have to change the URL for the namespaces. Is there an easier way so I do not need to go through them and change the URLs? (i.e. just have one file that works both on the development and production platforms)
Namespaces use URLs as a convention to help ensure uniqueness (e.g. so that two different people designing XML languages to describe events end up with
http://example.com/eventandhttp://example.net/eventinstead ofeventandevent).There is a convention to put a document relating to the namespace (such as a schema, or a human readable specification) at that URL, but that is just a convention.
You should not have to change the identifier you use in the xmlns attribute between development and production. An XML application is an XML application as far as namespaces are concerned, they pay no heed to development and production. (e.g. All XHTML uses the same namespace, it doesn’t matter if it is XHTML 1, XHTML 1.1, the XML serialisation of HTML 5 or something else).
So, in short:
Only ever use the production one. Don’t have a development namespace in the first place.