XMLを2つ出力するxslファイルを作成しました。外部XMLファイルからの出力
xmlのうちの1つは、1回だけ刈り取られます。その唯一の構造とその作業以来、私はそのコードを投稿しませんので、 しかし、他の私はツリー構造全体を出力したいです。しかし、それは最初のものだけを印刷します。木全体ではありません。
これは、病気は、現時点でまで来る何
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="$doc1//quiz//question">
<xsl:value-of select="$doc1//author" />
<br />
<xsl:value-of select="$doc1//questionText" />
<br />
<xsl:text>Ger </xsl:text><xsl:value-of select="$doc1//points" /><xsl:text> Poäng </xsl:text>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
おかげ
編集です:あなたの問題は、あなたがorigionalに戻って参照され ウィル広告私のXMLファイル
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="q2.xsl"?>
<quiz>
<question>
<author>Författare 1</author>
<questionText>Fråga 1</questionText>
<correct>Svar 1</correct>
<incorrect>fel 1</incorrect>
<incorrect>fel 1-2</incorrect>
<points>1</points>
</question>
<question>
<author>Författare 2</author>
<questionText>Fråga 2</questionText>
<correct>Svar 2</correct>
<incorrect>fel 2</incorrect>
<incorrect>fel 2-3</incorrect>
<points>2</points>
</question>
<question>
<author>Författare 3</author>
<questionText>Fråga 3</questionText>
<correct>Svar 3</correct>
<incorrect>fel 3</incorrect>
<incorrect>fel 3-4</incorrect>
<points>3</points>
</question>
<question>
<author>Författare 4</author>
<questionText>Fråga 4</questionText>
<correct>Svar 4</correct>
<incorrect>fel 4</incorrect>
<incorrect>fel 4-5</incorrect>
<points>4</points>
</question>
<question>
<author>Författare 5</author>+
<questionText>Fråga 5</questionText>
<correct>Svar 5</correct>
<incorrect>fel 5</incorrect>
<incorrect>fel 5-6</incorrect>
<points>5</points>
</question>
</quiz>
xmlを追加して解決策を提供する方が簡単かもしれません。 – Treemonkey