在没有网站的情况下分发 xml 模式 [英] Distribute xml schema without website

查看:30
本文介绍了在没有网站的情况下分发 xml 模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为将分发到多台计算机的程序创建 XML 架构.这些其他计算机将制作自己的 xml 文件以符合此架构.为了让他们引用架构,需要能够访问该架构.我没有一个网站,我可以像通常那样发布架构.我可以将架构与程序一起打包,但是我不确定如何让其他计算机的用户轻松地在他们的 xml 文件中引用架构.每台计算机的文件路径都不同.

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.

我想做一些类似 ROS Launch 文件的事情,它们使用 $(find program_name)/my_schema.xsd (http://wiki.ros.org/roslaunch/XML) 但我认为在这些启动文件之外不起作用.有什么建议吗?

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?

提前致谢!

推荐答案

如果您没有提供 XML 架构文件的网站,您可以随时使用云服务,例如 Dropbox 或 Google Drive,两者都可以将允许您通过 URL 公开文件.

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.

如果出于某种原因,您确实希望将 XSD 与项目的程序或 XML 文件一起打包,您可以通过

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

这篇关于在没有网站的情况下分发 xml 模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆