Jump to content

Confusing namespace declaration

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...