나는 이제에 대한 속성 LANG = "드"모든 송장 요소와 문서를 필터링 할XSL 필터 속성과 이름()
<files>
<documents lang="en">
<Invoice>22345</Invoice>
<Invoice>22346</Invoice>
<Offer>22345</Offer>
<Offer>22346</Offer>
</documents>
<documents lang="de">
<Invoice>92345</Invoice>
<Invoice>92346</Invoice>
<Offer>92345</Offer>
<Offer>92346</Offer>
</documents>
</files>
변수 XSL에 나온 XML을로드합니다. 물론
<xsl:variable name="documents" select="document('documents.xml')/files/documents" />
<xsl:variable name="documentName" select="'Invoice'" />
<xsl:apply-templates
mode="filter"
select="$documents[@lang='de' and name() = $documentName]"/>
<xsl:template mode="filter" match="entrys[@lang] | *">
<xsl:value-of select="."/>
</xsl:template>
는이
<xsl:apply-templates
mode="filter"
select="$documents[@lang='de' and */name() = $documentName]"/>
처럼해야 작동하지 않습니다 그러나 이것은 나에게 구문 오류를 제공합니다.
누군가가 아이디어를 도울 수 있습니다.
편집 '인보이스'가 필터에 하드 코딩되기 전에.
나는 이것을 더한다
미리 감사드립니다.
T.S
' "송장"'S : 당신 조회 XML과 함께
을,이 스타일 시트와/b'Invoice'' –
고마워, 편집했지만 문제가 여전히있다. – Thaispookie