This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Selecting node contents from several xml-files


Hi!

Is there some possibility to select node values (numbers) from 
several xml -files and then count them all together? 

I did try to use 

<xsl:for-each select="$P1//P1Kurssi/P1Arvosanat">
//variable declared below
<xsl:for-each select="$P2//P2Kurssi/P2Arvosanat">
<xsl:value-of select="count(arvosana)"/>

<xsl:variable name="P1" select="document('P1.xml')"/>
<xsl:variable name="P2" select="document('P2.xml')"/>

example of xml -file:

<?xml version="1.0"  encoding="ISO-8859-1" standalone="yes"?>
<Document title="Keskiarvot kurssien arvosanoista">

<P1Kurssi koodi="P1" name=" P1 Johdatus vuorovaikutteiseen mediaan" 
link="http://hypst09.uta.fi:6969/cgi-bin/html?P1";>
        <Opiskelijoita>23</Opiskelijoita>
    	<P1Arvosanat>
		<arvosana>3</arvosana>
		<arvosana>2.25</arvosana>
		<arvosana>1.75</arvosana>
		<arvosana>1.25</arvosana>
		<arvosana>2.75</arvosana>
	</P1Arvosanat>
</P1Kurssi>
</Document>

******************************************************************
Jarkko Moilanen         *You are wise, witty, and wonderful,     *
Researcher/ ITCM        *but you spend too much time             *
jm60697@uta.fi          *reading this sort of trash.             *
www.uta.fi/~jm60697     *                                        *
GSM: +358 50 3766 927   *                                        *
******************************************************************
* ITCM | Information Technology and Crisis Management            *
* http://www.itcm.org                                            *
******************************************************************

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]