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
Xslt 输出中将显示另一个e2open:Item元素_Xslt - Fatal编程技术网

Xslt 输出中将显示另一个e2open:Item元素

Xslt 输出中将显示另一个e2open:Item元素,xslt,Xslt,代码中出现了一个额外的代码。请验证代码,并建议我一个解决方案,提前感谢 ***************************************我的意见*********************************************** <e2open:ItemMessage xmlns:e2open="http://www.e2open.com/E2openMCM"> <e2open:Item itemIdentifier="30N20" descriptio

代码中出现了一个额外的代码。请验证代码,并建议我一个解决方案,提前感谢

***************************************我的意见***********************************************

<e2open:ItemMessage xmlns:e2open="http://www.e2open.com/E2openMCM">
<e2open:Item itemIdentifier="30N20" description="SRV,OS,WINBLUE,QFE,KB3037317" revision="X00-00"
           lifeCycleCode="X Revision" itemPartType="Service Install" itemClassification="Service Install"
           proprietaryProductFamily="Inspiron" makeBuy="XCom Design" revisionReleaseDate="2015-05-13T05:54:49+00:00"
           businessEntity="95" businessEntityType="ENTERPRISE" dataSource="XCom" operationCode="A">

</e2open:Item>
<e2open:Item itemIdentifier="J7C27" description="SRV,OS,WINBLUE,QFE,KB3022289" revision="X00-00"
           lifeCycleCode="X Revision" itemPartType="Service Install" itemClassification="Service Install"
           proprietaryProductFamily="Inspiron" makeBuy="XCom Design" revisionReleaseDate="2015-05-13T05:54:49+00:00"
           businessEntity="95" businessEntityType="ENTERPRISE" dataSource="XCom" operationCode="A">

</e2open:Item>
</e2open:ItemMessage>
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:e2open="http://www.e2open.com/E2openMCM" xmlns="http://www.w3.org/2001/XMLSchema">
 <xsl:output method="xml" indent="yes"/>
  <xsl:strip-space elements="*"/>
 <xsl:template match="e2open:ItemMessage">
<xsl:element name="e2open:ItemMessage" xmlns="http://www.e2open.com/E2openMCM">
<xsl:attribute name="headerVersion">1.0</xsl:attribute>
<xsl:attribute name="fromID">XCom</xsl:attribute>
<xsl:attribute name="toID">E2OPEN</xsl:attribute>
<xsl:attribute name="messageType">Item</xsl:attribute>
<xsl:attribute name="messageVersion">MCM1.0</xsl:attribute>
<xsl:attribute name="messageCount">1</xsl:attribute>
<xsl:attribute name="messageIndex"><xsl:value-of select="@messageIndex"/>      </xsl:attribute>
    <xsl:for-each select="e2open:Item">
 <xsl:if test="@itemClassification!='Software Bundle'">
 <xsl:copy>
 <xsl:apply-templates select="node()|@*"/>
 </xsl:copy>
</xsl:if>
</xsl:for-each>
</xsl:element>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
***************************************我的XSLT***********************************************

<e2open:ItemMessage xmlns:e2open="http://www.e2open.com/E2openMCM">
<e2open:Item itemIdentifier="30N20" description="SRV,OS,WINBLUE,QFE,KB3037317" revision="X00-00"
           lifeCycleCode="X Revision" itemPartType="Service Install" itemClassification="Service Install"
           proprietaryProductFamily="Inspiron" makeBuy="XCom Design" revisionReleaseDate="2015-05-13T05:54:49+00:00"
           businessEntity="95" businessEntityType="ENTERPRISE" dataSource="XCom" operationCode="A">

</e2open:Item>
<e2open:Item itemIdentifier="J7C27" description="SRV,OS,WINBLUE,QFE,KB3022289" revision="X00-00"
           lifeCycleCode="X Revision" itemPartType="Service Install" itemClassification="Service Install"
           proprietaryProductFamily="Inspiron" makeBuy="XCom Design" revisionReleaseDate="2015-05-13T05:54:49+00:00"
           businessEntity="95" businessEntityType="ENTERPRISE" dataSource="XCom" operationCode="A">

</e2open:Item>
</e2open:ItemMessage>
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:e2open="http://www.e2open.com/E2openMCM" xmlns="http://www.w3.org/2001/XMLSchema">
 <xsl:output method="xml" indent="yes"/>
  <xsl:strip-space elements="*"/>
 <xsl:template match="e2open:ItemMessage">
<xsl:element name="e2open:ItemMessage" xmlns="http://www.e2open.com/E2openMCM">
<xsl:attribute name="headerVersion">1.0</xsl:attribute>
<xsl:attribute name="fromID">XCom</xsl:attribute>
<xsl:attribute name="toID">E2OPEN</xsl:attribute>
<xsl:attribute name="messageType">Item</xsl:attribute>
<xsl:attribute name="messageVersion">MCM1.0</xsl:attribute>
<xsl:attribute name="messageCount">1</xsl:attribute>
<xsl:attribute name="messageIndex"><xsl:value-of select="@messageIndex"/>      </xsl:attribute>
    <xsl:for-each select="e2open:Item">
 <xsl:if test="@itemClassification!='Software Bundle'">
 <xsl:copy>
 <xsl:apply-templates select="node()|@*"/>
 </xsl:copy>
</xsl:if>
</xsl:for-each>
</xsl:element>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

无法将输出粘贴到此处。。因此,请使用给定的输入运行xslt。请注意,输出在每个e2open:Item itemsidentifier的开头都附带了一个额外的e2open:Item元素

如果您的输入在XSLT.Hi-Joel上进行了测试,则假定的输出与您声称的不同。。我已重新措辞了这个问题。。请检查一下,我无法将输出粘贴到文本框中。此链接似乎已断开: