简体   繁体   English

如何从xml生成xslt文件

[英]How to generate a xslt file from xml

I'm beginner with xml and xsl. 我是xml和xsl的初学者。 I'm looking for the way to generate or understanding how is the using of xsl stylesheet. 我正在寻找生成或了解xsl样式表的使用方式的方法。 In my particular case, I'm using a html file which it converts to xhtml. 在我的特定情况下,我使用的是html文件,它将转换为xhtml。 The next step I want to convert is the file generated to xsl-fo but I've seen I have to use a xslt stylesheet to do that. 我要转换的下一步是将文件生成为xsl-fo,但是我已经看到必须使用xslt样式表来执行此操作。 My question is about this file. 我的问题是关于这个文件的。 How is it generate this xsl file? 它是如何生成此xsl文件的? Is generated from the xhtml file? 是从xhtml文件生成的?

Thanks! 谢谢!

Antenna House provides a sample XHTML to XSL-FO stylesheet under the 'XHTML to XSL-FO' tab at http://www.antennahouse.com/antenna1/xml-to-xsl-fo-stylesheets/ . Antenna House在http://www.antennahouse.com/antenna1/xml-to-xsl-fo-stylesheets/的“ XHTML to XSL-FO”选项卡下提供了一个示例XHTML to XSL-FO样式表。 There's also an XSL-FO tutorial available under the 'XML to XSL-FO' tab. 在“ XML到XSL-FO”选项卡下还有一个XSL-FO教程。

Generally, the XSL file for an XSL-FO conversion is not generated. 通常,不会生成用于XSL-FO转换的XSL文件。 You'll have to create this file yourself. 您必须自己创建此文件。 It contains a lot of information not present in the XHTML, for example page layouts. 它包含许多XHTML中不存在的信息,例如页面布局。

XSL-FO is a bit like CSS, yes. XSL-FO有点像CSS,是的。 The difference is that XSL-FO has lots more options, so an XSL-FO file is 100 times longer than a CSS file. 不同之处在于XSL-FO具有更多选项,因此XSL-FO文件比CSS文件长100倍。

Here's an introduction to XSL-FO . 这是XSL-FO介绍

And another tutorial . 还有另一个教程

Okay this site can give you some helps to generate xslfo site . 好的,该站点可以为您提供一些帮助来生成xslfo 网站
Abd if you wont the contrary this site is fine XSL FO to HTML Converter 如果您没有相反的话,那么Abd这个网站是XSL FO到HTML转换器的很好工具

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM