开发者

How to distribute XML schema definitions (XSD)

I am curious about what are considered best practices when it comes to distributing XML schemas.

In my particular situation, I have a webservice which accepts an XML file that must conform to an XSD that I have defined. I am thinking of distributing the XSD to clients via a complimentary webservice that can be i开发者_JAVA技巧nvoked at any time.

Please share any ideas or ways that you have distributed XSD's.


Just put the XSD on a web server, so people and programs can easily access it using plain HTTP. There's no need to write a web service for that. Put the link to the XSD into your manual / documentation, and everybody can use it.


Take a look at http://schemas.opengis.net:

  • Make sure your schemas are valid like angel's feathers.
  • Make your schemas accessible via web. HTTP first of all. No "please accept this license first" disclaimer.
  • Make sure your schemas use only relative URLs referring to one another.
  • Assemble a downloadable package (ZIP) with your schemas.

Many people will want to access your schemas online. Some will want to put your schemas into their software - to be able to validate against these schemas offline/without depending on your server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜