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
Xaml 此元素上不允许XSLT属性匹配_Xaml_Xslt - Fatal编程技术网

Xaml 此元素上不允许XSLT属性匹配

Xaml 此元素上不允许XSLT属性匹配,xaml,xslt,Xaml,Xslt,我得到的属性匹配在这个元素上是不允许的错误在所有这些元素上都是XAML,除了根元素。我想我遗漏了一些关于语法的东西 <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output omit-xml-declaration="yes" indent="

我得到的
属性匹配在这个元素上是不允许的
错误在所有这些元素上都是XAML,除了根元素。我想我遗漏了一些关于语法的东西

<?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
       <xsl:output omit-xml-declaration="yes" indent="yes" />
       <xsl:strip-space elements="*" />
               <xsl:output method="html"/>
        <xsl:template match="/">  
            <html>
                <body>
                   <xsl:apply-templates match="/Table"/>
                    <xsl:apply-templates match="/Paragraph"/>
                    </body>
            </html>
            </xsl:template>

            <xsl:template match="Table">
                <table>
                    <xsl:apply-templates match="TableRowGroup"/>
                </table>
            </xsl:template>


            <xsl:template match="TableRowGroup">
                    <xsl:apply-templates match="TableRow"/>
            </xsl:template>


            <xsl:template match="TableRow">
                <tr>
                    <xsl:apply-templates match="TableCell"/>
                </tr>
            </xsl:template>


            <xsl:template match="TableCell">
                <td>
                </td>
            </xsl:template>

            </xsl:stylesheet>


使用
而不是

ty。它现在在某种程度上起作用,但它忽略了表,。。。。子元素,仅输出到
。带有任何选择器的
为我提供了里面的所有文本,但是选择器根本不起作用
应用模板
只允许
选择
属性,而不允许
匹配
属性。因此,我认为就错误而言,我的问题解决了问题。如果您还有其他问题,请发布一个新问题,显示输入XML结构、您想要的输出和当前获得的输出。同时使用
显然看起来有些奇怪或错误,但如果不知道输入XML,就很难说出您想要什么。