0

My XML code

    <INSTRUCTION_LIST>
        <INSTRUCTION_LIST_ITEM>
            <NTC_NAV3INSTRUCT>
                <IMMUTABLE_ID>5790</IMMUTABLE_ID>
                <DESCRIPTION>
                    <P>Buongiorno</P>
                    <P>come</P>
                    <P>andiamo</P>
                    <P>stasera</P>
                    <P>?</P>
                </DESCRIPTION>
            </NTC_NAV3INSTRUCT>
        </INSTRUCTION_LIST_ITEM>
        <INSTRUCTION_LIST_ITEM>
            <NTC_NAV3INSTRUCT>
                <IMMUTABLE_ID>5791</IMMUTABLE_ID>
                <DESCRIPTION>QUESTA MACCHINA E BELLISSIMA</DESCRIPTION>
            </NTC_NAV3INSTRUCT>
        </INSTRUCTION_LIST_ITEM>
    </INSTRUCTION_LIST>

The XSLT:

<xsl:for-each select="following-sibling::INSTRUCTION_LIST//DESCRIPTION"> 
    <div>
    <xsl:value-of select="."/>
    </div>                          
</xsl:for-each>

I obtain this result

Buongiorno come andiamo stasera?
QUESTA MACCHINA E BELLISSIMA

IS not correct i would this result:

Buongiorno
come
andiamo
stasera
?
QUESTA MACCHINA E BElLISSIMA

I would that result respect <P> tag.

4

1 回答 1

2

Value-of gets you string value of selected node (i.e. concatenated strings of this nodes and its descendants). Try to use copy-of instead.

于 2013-10-17T09:01:05.847 回答