从xsd获取html表单 [英] Get html form from xsd

查看:126
本文介绍了从xsd获取html表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常复杂的xsd文件描述了一些对象(它不重要,但它是DATEX II标准)
你知道是否有一种自动方式来创建一个像向导的html表单引导用户创建xml对象,如xsd?

I have a quite complex xsd file that describe some objects (it's not important, but it's the DATEX II standard) Do you know if there is an automatic way to create an html form that act like a "wizard" to guide the user to create xml object as described in the xsd?

推荐答案

这个问题的答案取决于预期的用户群,您希望用户如何访问您的表单,以及您已经或者您愿意部署的技术堆栈。

The answer to this depends on the intended user base, how you want your users to access your forms, and the technology stack you have in place already or you're willing to deploy.

如果您的用户是质量控制分析师因此,目的是让他们使用生成的UI来管理测试用例,然后一些商业工具就具备了这种能力。在Google上快速搜索从XSD生成ui表单以测试Web服务等术语应该会在第一页为您提供此空间中的主要参与者(我不会为了避免利益冲突而命名。供应商如何处理这种情况存在差异,这与从大型XML Schema生成这些表单所需的时间有关,而这些表单又会转化为不同程度的可用性。鉴于我在DATEX中看到的,从复杂性的角度来看,你可能很难找到一个免费的工具...

If your users are quality control analysts, and so the intent is to have them use that generated UI to manage test cases, then a handful of commercial tools have this ability. A quick search on Google for terms such as "generate ui forms from XSD to test web services" should give you on first page the major players in this space (I won't name names to avoid conflict of interests). There are differences in how vendors approach this, that have to do with the time it takes to generate these forms from large bodies of XML Schema, which in turn translate into different degrees of usability. Given what I see in DATEX, from a complexity perspective, you may have a hard time to find a free tool for this...

如果你的用户是数据输入专家,那么以上不是你想要他们使用的工具。在不了解您的环境的情况下(我看到了您的java-ee标记,但仍然不清楚它与此任务的关系),一个模型可以是InfoPath与SharePoint的组合;虽然生成表单的过程并非完全自动化,但它接近于此。它是XSD驱动的,在设计时你将XSD拖放到设计表单上,这允许你构建一些非常好的UI。在您的特定技术堆栈上跟随他们的竞争对手,您可能会得到答案。或者,您可以访问列出XForms实施的网站; IBM的表单设计器,与InfoPath非常相似,可以使用XML Schema进行设计等。

If your users are rather data entry specialists, then the above are not the tools you want them to use. Without knowing much about your environment (I see your java-ee tag, but still not clear how it would relate to this task), one model could be a combination of InfoPath with SharePoint; while the process to generate the form is not fully automatic, it comes close to that. It is XSD driven, in the sense that at design time you drag and drop XSD on a design form, that allows you to build some really nice UI. Follow their competition on your particular technology stack and you may have your answer. Or, you can go to this site that lists XForms implementations; IBM's form designer, much like InfoPath, can use XML Schema for design, etc.

如果这是供开发人员获取XML的话,另一种选择也可能是基于Excel(或SharePoint列表)的方法,并根据该数据生成XML(您需要花费成本来获取特定于您的需求工具的内容,这里假设人们非常熟悉电子表格)。

If this is for developers to get some XML, another alternative might also be to go with an Excel based (or SharePoint lists) approach and generate XML from that data (you give away cost to acquire something to build specific to your requirements tooling, here assuming people that are really familiar with spreadsheets instead).

鉴于DATEX模型的外观,如果您计划使用可扩展性模型,或者如果您选择为不同的方案构建不同的表单,而不是一个,则必须进行一些手动自定义。一个大的形式,它将给你所有后代的抽象有效载荷出版物在一些下拉,只是一个特定的,简单的形式,例如MeasurementSiteTablePublication。

Given how DATEX model looks like, you'll have to do some manual customizations anyway, if you plan to use the extensibility model, or if you choose to build different forms for different scenarios i.e. instead of one big form that'll give you all descendents for the abstract payloadPublication in some drop down, to just a specific, simple form e.g. MeasurementSiteTablePublication.

这篇关于从xsd获取html表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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