Jump to content

Confusing namespace declaration


Kahor
 Share

Recommended Posts

Hello everyoneI am a bit confused about namespaces, I want to make two different xsd files for two different xml files, it so happens that some of the elements in the two xml files have the same names but different contents, and I declare then in my xsd files as global attributes, how can I declare my namespaces (on the same website) to avoid conflicts ?I was thinking of using xsi:schemaLocation="http://www.url.com file.xsd" in each xml file with different "file.xsd"Any help/examples/explanations would be welcome.Thx

Link to comment
Share on other sites

The idea behind namespaces is to avoid name conflicts and exactly in cases like this where the element may have the same name but different meaning and/or content.Give one of the XML files and its associated schema a different namespace URI, and that's pretty much it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...