xml 是否有可以通过示例创建 XSLT 的 XSL 代码生成器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/483064/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is There An XSL Code Generator That Can Create XSLT By Example?
提问by Vihung
Given a source XML document and a sample of what it should look like after it is transformed, is there a code generator that could create an XSL transform to accomplish that.
给定一个源 XML 文档和一个转换后它应该是什么样子的示例,是否有一个代码生成器可以创建一个 XSL 转换来完成它。
I am not expecting it to be perfect but, much like the code generators that can create XSD from sample XML, it would be a good starting point to then refine by hand.
我并不期望它是完美的,但是,就像可以从示例 XML 创建 XSD 的代码生成器一样,这将是一个很好的起点,然后手动改进。
采纳答案by saurabhj
回答by Robert Rossney
What you're asking is, essentially, "Given a set of input data and an output, is it possible to infer the logic of a program that will produce that output?" Except for the trivial case - where the program produces the provided output irrespective of the input - the answer is "No."
您要问的是,本质上,“给定一组输入数据和一个输出,是否有可能推断出将产生该输出的程序的逻辑?” 除了微不足道的情况 - 无论输入如何,程序都会产生提供的输出 - 答案是“否”。
回答by Robert Rossney
try ALTOVA MapForce (http://www.altova.com/mapforce.html)
尝试 ALTOVA MapForce ( http://www.altova.com/mapforce.html)

