xslt删除p元素
这是我的XML文件。我想导入描述节点标记的内容 没有XSLT中的xslt删除p元素,xslt,xslt-1.0,Xslt,Xslt 1.0,这是我的XML文件。我想导入描述节点标记的内容 没有XSLT中的标记 <DESCRIPTION> <P>A pagina 3, modificare:</P> <P>carte per il diporto - Leisure crafts</P> <P>in:</P> <P> <STRONG>Carte Nautiche in Kit - Naut
标记
<DESCRIPTION>
<P>A pagina 3, modificare:</P>
<P>carte per il diporto - Leisure crafts</P>
<P>in:</P>
<P>
<STRONG>Carte Nautiche in Kit - Nautical Charts in </STRONG>
</P>
</DESCRIPTION>
我想:
1) A pagina 3, modificare: <------((((( look in the same line ))))))
carte per il diporto - Leisure crafts charts...............................................51
in:
Carte Nautiche in Kit - Nautical Charts in Kit.........................................51
1)第3页,修改内容:此XSLT样式表:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<!-- The identity transform. -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- Don't copy P elements themselves but do output their contents.
Enumerate the descriptions. -->
<xsl:template match="P">
<xsl:if test="count(preceding-sibling::P) = 0">
<xsl:value-of select="count(../preceding-sibling::DESCRIPTION) + 1"/>
<xsl:text>) </xsl:text>
</xsl:if>
<xsl:apply-templates select="node()|@*"/>
</xsl:template>
</xsl:stylesheet>
我想这正是你想要的。嗨,你能把你的问题正确地格式化吗,只把输入/输出放在代码块中?请参阅以寻求帮助。我会为你编辑它,但我不能确切地告诉你想要什么输出!1) A第3页,修改件:现在我有这个:1)在下一行A第3页,修改件。我会坐在同一排。这个问题变成了P标签。什么都没有,因为我有很多包含表的od描述。你有邮件地址吗?不,我只想删除P标签。在描述表或oter元素中存在这样的情况。描述节点由word编辑器创建。我想删除onli p标记。请随意打开另一个问题,或添加到您现有的问题中,并举例说明导致问题的XML 这是一个值得庆祝的节日。
。索诺·苏拉·斯特萨·里加·韦迪亚莫·科莫塔。这是一个很好的例子。
在因维的第三个村庄,两个村庄的面积相当于两个村庄的面积。
1) A pagina 3, modificare: <------((((( look in the same line ))))))
carte per il diporto - Leisure crafts charts...............................................51
in:
Carte Nautiche in Kit - Nautical Charts in Kit.........................................51
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<!-- The identity transform. -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- Don't copy P elements themselves but do output their contents.
Enumerate the descriptions. -->
<xsl:template match="P">
<xsl:if test="count(preceding-sibling::P) = 0">
<xsl:value-of select="count(../preceding-sibling::DESCRIPTION) + 1"/>
<xsl:text>) </xsl:text>
</xsl:if>
<xsl:apply-templates select="node()|@*"/>
</xsl:template>
</xsl:stylesheet>
<DESCRIPTION>
<P>A pagina 3, modificare:</P>
<P>carte per il diporto - Leisure crafts</P>
<P>in:</P>
<P>
<STRONG>Carte Nautiche in Kit - Nautical Charts in </STRONG>
</P>
</DESCRIPTION>
1) A pagina 3, modificare:
carte per il diporto - Leisure crafts
in:
Carte Nautiche in Kit - Nautical Charts in