0

I am currently writing various XML Schemas. As far as writing the schemas themselves I'm good. I've looked into this extensively already however I am having a little difficulty in finding relevant information on the IT side of it. Perhaps I'm just using the wrong keywords, so I apologize if this is a duplicate. I did make quite an effort to find this information myself. Thank you in advance for taking the time out to help me.

If stored server side I'd desire to have these schemas at http://schemas.mycompany.com/SchemaName. It doesn't seem at all necessary to set up a separate domain controller or anything like that for the schemas sub-domain. An OU on the primary domain's DC should be satisfactory, if I'm not mistaken. Then I would just have to put them on a separate web server for the schemas.

I also noticed in my personal research on the topic that they can also be stored locally. How to reference a local XML Schema File Correctly.

So now that I covered the background information adequately, on to the question. Which is better and for what situations? When would it be appropriate to store schemas on a server versus having them stored locally? To be more explicit, what are the best practices, and pros and cons for each scenario here?

kjhughes
  • 106,133
  • 27
  • 181
  • 240
Hawkeye4040
  • 126
  • 10
  • 1
    Namespaces don't have to be URLs, and if they are they don't have to be dereferenceable. – Max Toro Nov 13 '19 at 02:21
  • Yeah I'm aware of that something like: file:///C:/environment/workspace/maven-ws/ProjextXmlSchema/email.xsd would work locally. What I wanted to know is when is it appropriate to store these locally versus on a server. The schemas are already in the .dll's so it'd seem like it'd make sense to just keep them there but I wanted to be a bit more sure about it. What do you mean by, "they don't have to be dereferenceable?" – Hawkeye4040 Nov 13 '19 at 02:28
  • You don't need to host the schema at `http://schemas.mycompany.com/SchemaName`. That URL does not need to exist, it's simply an (opaque) identifier. – Max Toro Nov 13 '19 at 02:44
  • Ah I see what you meant now by that thank you for clarifying. So it would seem then that it'd be very unlikely that having this stored locally Project.Core.IO.dll would cause any problems. I thought so since it would have the library there with the schema so as long as I reference it appropriately for local using file:/// method. I assume a scenario like with W3 would be a more appropriate one to have it hosted then. I mean correct me if I'm wrong but that does seem pretty sound. I feel much better about this now thank you again. – Hawkeye4040 Nov 13 '19 at 02:50

1 Answers1

2

XSD dissemination is facilitated by making XSDs available at a location accessible to (and preferably easily discoverable by) the intended audience. Using URLs for namespaces and storing the associated XSDs there directly or through documentation links is a reasonable approach to making XSDs available and able to be found.

Separate from the above concern is where and how a given user base will access the XSDs. It's often preferable to separate publication/dissemination from operational access, and XML Catalogs provide a flexible mechanism to specify a level of indirection between XSD references and prefered physical locations, such as local cached copies of XSDs.

See also:

kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • Thank you the links are especially helpful this is what I was looking for. The tags you added also provided me with the keywords I was missing too I see. – Hawkeye4040 Nov 13 '19 at 03:04