需要一种工具来将XSD架构与导入合并,并将其包含到单个文件中 [英] Need a tool to merge an XSD schema with imports and includes into a single file

查看:75
本文介绍了需要一种工具来将XSD架构与导入合并,并将其包含到单个文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个xsd文件,具有多个导入并包含.

I an xsd file with multiple imports and includes.

我基本上需要将架构合并到单个文件中,以供第三方应用程序使用(不支持包含).

I need to basically merge the schema into a single file for use in a third-party application (which does not support includes).

有免费的/开源工具或脚本可以做到这一点吗?

Is there a free/opensource tool or script that can do this?

推荐答案

您可能会发现有几次这样的要求很有帮助,例如此处.另一个免费来源可能是Microsoft的 Technet ,因为它与MS SQL Server产品中存在的限制有关(也显示了与您的问题相关的真实示例),其中不支持< xsd:include/> s.如果您没有编译和运行该代码的能力,则仍然可以在C#脚本引擎(例如.

You may find helpful the same that was asked on SO a couple of times, for example here and here. Another free source might be the one described on Microsoft's Technet, as it relates to limitations present in MS SQL Server products (also showing a real life example related to your question), where <xsd:include/>s are not supported. If you don't have the ability to compile and run that code, you can still use it as a "script" with little help from a C# script engine such as this.

但是,正如我指出的那样此处,鉴于架构文件只能定位一个名称空间的限制,不能将< xsd:import/>进行重构".

However, as I've pointed out here, the <xsd:import/>s cannot be refactored "out" given the limitation where a schema file can only target one namespace.

如果您曾经遇到过非常严重的重构场景,例如此处所述,您可能需要考虑其他事项...

If you're ever into a really serious refactoring scenario such as the one described here, you may have to consider something else...

这篇关于需要一种工具来将XSD架构与导入合并,并将其包含到单个文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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