Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么风格不';不适用于princexml中的xml_Xml_Xslt_Princexml - Fatal编程技术网

为什么风格不';不适用于princexml中的xml

为什么风格不';不适用于princexml中的xml,xml,xslt,princexml,Xml,Xslt,Princexml,我有一些XML: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="./example.xsl"?> <article> <title>Some title</title> <author>Some Author</author> </article> 但是我需要从这个XML

我有一些XML:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="./example.xsl"?>
<article>
    <title>Some title</title>
    <author>Some Author</author>
</article>

但是我需要从这个XML生成PDF,因此当我运行
prince./examples/example.XML
生成包含以下内容的PDF时,我应该使用
princexml

为什么样式不适用于
princexml内部的xml?

Prince不支持XSL,它支持CSS。请先使用XSLT处理器转换XML,然后将结果传递给Prince。

Prince不支持XSL,它支持CSS。请先使用XSLT处理器转换XML,然后将结果传递给Prince。

fo中支持H1和H2?我是否正确理解浏览器和Prince中的显示不应匹配?当我选择
princexml
时,我指望它会在浏览器中显示页面上的内容,并加上打印样式,
princexml
可以在我试图运行
prince./examples/example.html
h1
和其他
html
标记看起来与预期一样。fo支持h1和H2?我是否正确理解显示在浏览器和prince中的不匹配?当我选择
princexml
时,我指望它会在浏览器中显示页面上的内容,并加上打印样式,
princexml
在我试图运行
prince./examples/example.html
h1
和其他
html
标记时可以处理的样式。
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/2001/XMLSchema-instance">
  <xsl:output method="html" />

  <xsl:template match="/">
    <h1>
      <xsl:value-of select="//title"/>
    </h1>
    <h2>
      <xsl:value-of select="//author"/>
    </h2>
  </xsl:template>
</xsl:stylesheet>