Distribute xml schema without website

十年热恋 提交于 2019-12-31 04:14:20

问题


I am creating an XML schema for a program that will be distributed to multiple computers. These other computers will be making their own xml files to conform to this schema. In order for them to reference the schema, the need to have access to that schema. I do not have a website I can post the schema on like is commonly done. I can package the schema along with the program, but then I am not sure how to make it easy for the users of the other computers to reference the schema in their xml files. The file path for each computer would be different.

I want to do something like ROS Launch files where they use $(find program_name)/my_schema.xsd (http://wiki.ros.org/roslaunch/XML) but I do not think that works outside of those launch files. Any suggestions?

Thanks in advance!


回答1:


If you do not have a website at which to serve your XML Schema file, you can always use a cloud service such as Dropbox or Google Drive, both of which will allow you to make a file publicly available via a URL.

  • See How do I link to a file or folder? for Dropbox.
  • See How to share for Google Drive.

If for some reason you do wish to package the XSDs with the program or XML files of your project, you can avoid problems locating the XSDs on different machines via

  • Relative paths
  • OASIS XML Catalogs


来源:https://stackoverflow.com/questions/23317467/distribute-xml-schema-without-website

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!