如何通过给定的XML创建自动XSL? [英] How to create auto XSL by given XML?

查看:50
本文介绍了如何通过给定的XML创建自动XSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有XML文件,对于xslt转换需要创建XSL,如果有任何遗漏的标签或无效的参数,则需要消耗更多的时间来创建并且很难找到。任何人都可以通过给定的XML格式了解自动XSL创建吗?

I have XML files, for xslt transformation need to create XSL which consumes more times to create and difficult to find if any missed tags or invalid paramenter. Can anyone knows about auto XSL creation by given XML format?

推荐答案

这个问题毫无意义。 XML样本甚至XML模式都没有定义XSL转换(我希望你知道它意味着可扩展样式表语言, http:// en。 wikipedia.org/wiki/XSL [ ^ ]) 。



XSL旨在将某些类型的XML文档转换为某些输出,XML,纯文本,HTML(非常常见的应用程序),类似的东西。 XSL是一个在输入上有XML并生成一些输出的函数。理论上不可能通过有限的输入+输出样本集来恢复一些通用函数。然而,有时可以基于样本集(甚至一个样本)重建这样的函数,具有有限的鲁棒性。这样的算法确实存在。 但即使你已经有了这样的算法,你也需要提供输入和输出的样本,而不仅仅是XML。这就是为什么这个问题毫无意义。



-SA
The question makes no sense. XML sample or even an XML schema does not define XSL transformation (I hope you know that it means Extensible Stylesheet Language, http://en.wikipedia.org/wiki/XSL[^]).

XSL is designed to transform some class of XML document to some output, XML, plain text, HTML (very usual application), something like that. XSL is a function having XML on input and generating some output. It is theoretically impossible to restore some general function by finite set of input + output samples. However, it is sometimes possible to recreate such function based on set of samples (even one sample), with limited robustness. Such algorithms do exist. But even if you already had such algorithm, you would need to supply samples of both input and output, not just XML. That's why this question makes no sense.

—SA


这篇关于如何通过给定的XML创建自动XSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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