[xsl] regarding xpath

Subject: [xsl] regarding xpath
From: "william locksman" <vsd18@xxxxxxxxxxxxxx>
Date: 24 Apr 2002 09:40:22 -0000

hi i have the following problem have an xml file that looks like <colleges>

<college id = "1">
<name>A College</name>
</college>

<college id = "2">
<name>B College</name>
</college>

<college id = "1">
<name>C College</name>
</college>

</colleges>

to print the college names,
if i write an XPATH expression like
-----------------------------------------------
<xsl:for-each select="/colleges/college/name">
<xsl:value-of select="."/>.
</xsl:for-each>
-----------------------------------------------
OR
-----------------------------------------------
<xsl:for-each select="//colleges/college/name">
<xsl:value-of select="."/>.
</xsl:for-each>
-----------------------------------------------
OR
-----------------------------------------------
<xsl:for-each select="//college/name">
<xsl:value-of select="."/>.
</xsl:for-each>
-----------------------------------------------

for all the above XPATH expressions in select , i seem to be getting the names. If so then what is the significant difference between the three statements??


the above code is in <xsl:template match = "/"> ( from root )


thanks
_________________________________________________________
Click below to visit monsterindia.com and review jobs in India or Abroad
http://monsterindia.rediff.com/jobs



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



Current Thread