0
나는 XML 문서에서 성공하지 텍스트 노드를 제거하기 위해 노력하고있어 제거, 이것은 내가 사용하고있어 XSLT입니다 : 다른 라인이기 때문에XSLT 모든 텍스트 노드
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml"/>
<xsl:template match="/*">
<xsl:copy>
<xsl:apply-templates select="node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="/*/*">
<xsl:element name="x">
<xsl:attribute name="attr">
<xsl:value-of select="name()"/>
</xsl:attribute>
<xsl:apply-templates select="node()" />
</xsl:element>
</xsl:template>
<xsl:template match="/*/*/a">
<xsl:copy>
<xsl:apply-templates select="node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="/*/*/a/*">
<xsl:copy-of select="node()"/>
</xsl:template>
<xsl:template match="/*/*/*">
<xsl:copy-of select="node()"/>
</xsl:template>
<xsl:template match="/*/*/*[not(self::a)]" />
<xsl:template match="text()" />
</xsl:stylesheet>
라인 <xsl:template match="text()">
아마 작동하지 않습니다 더 구체적인 (생각합니다), 어떻게 모든 텍스트 노드를 제거 할 수 있습니까?
고맙습니다. – MoreOver