2
xml 파일에서 엔티티를 찾아야합니다. 이 엔티티는 십진수, 16 진수 또는 이름이 붙을 수 있습니다 (공통 또는 자체).가능한 모든 엔티티를 찾는 방법
test.xml의
<test>Hello, world!</test>
내가 test1.xsl에게
<xsl:template match="//text()">
<xsl:if test="matches(., '&.*;')">
<xsl:value-of select="."/>
</xsl:if>
</xsl:template>
또는 test2.xsl를 사용하려고
<xsl:template match="//text()">
<xsl:variable name="ent"><![CDATA[&.*;]]></xsl:variable>
<xsl:if test="matches(., $ent)">
<xsl:value-of select="."/>
</xsl:if>
</xsl:template>
하지만, 결과가 없습니다.
정규 표현식을 사용하여 엔티티를 찾는 방법이 있습니까?
어쩌면 matches(., _entities_)
과 같은 것을 사용할 수있는 특수한 텍스트 유형이 있습니까?