문제 :XML에 태그 내의 모든 태그가 표시되지 않습니다
우리는 많은 텍스트를 보여주는 XML 문서를 가지고 있습니다. 이 텍스트는 -p-tags 안에 싸여 있으며 모든 것이 -avsnitt-라는 태그 안에 싸여 있습니다. 그러나 모든 -avsnitt-의 첫 번째 -p-tag 만 표시됩니다.
XML 코드 :
<seksjon>
<p>3.1. Introduction</p>
<avsnitt>
<p>SIMULA is a general purpose programming language. It inherits the algorithmic properties of ALGOL 60 and introduces methods for structuring data. The main characteristic of SIMULA is that it is easily modelled towards specialized problem areas, and hence can be used as a basis for Special Application Languages.</p>
<p>In this Standard the name SIMULA is considered synonymous with SIMULA 67. Although there exists a predecessor, SIMULA I, this latter language has achieved limited use. It is recommended that the language defined in this Standard be referred to as "Standard SIMULA".</p>
<p>SIMULA includes most of the ALGOL 60 language. Wherever ALGOL is used in this Standard it relates to the STANDARD ALGOL 60 definition (ISO 1538).</p>
</avsnitt>
</seksjon>
XSL 코드 : 반환됩니다 이상의 노드를 포함하는 노드 집합을 제공 value-of
때문에 XSLT 1.0을 사용하는 경우 올바른
<xsl:for-each select="kapittel/seksjon">
<h2><xsl:value-of select="p"/></h2>
<br></br>
<xsl:value-of select="avsnitt/p"/>
</xsl:for-each>
당신을 감사로
<xsl:value-of
를 대체 할 수 있습니다! 매력처럼 작동합니다! – BTB