The problem is that I don't know how to set and the get value of xsl variable.
1. <ul> 2. <xsl:for-each select="CITIES/CITY"> 3. <li> 4. <a type="button" style="font-size: 20px"> 5. <xsl:value-of select="NAME"/> 6. <xsl:variable name="id" select="@id"/> 7. </a> 8. </li> 9. </xsl:for-each> 10. </ul> 11. 12. <city> 13. <xsl:template match="CITIES/CITY[@id]"> 14. <xsl:value-of select="NAME"/> 15. <details> 16. <xsl:value-of select="CREATE_ID"/> 17. <xsl:value-of select="UPDATE_ID"/> 18. <xsl:value-of select="CREATE_DATE"/> 19. <xsl:value-of select="CONFIRMED"/> 20. <xsl:value-of select="STADIUM"/> 21. <xsl:value-of select="KM_STADIUM"/> 22. <xsl:value-of select="APPROACH"/> 23. <xsl:value-of select="PUBLICTRANS"/> 24. </details> 25. <textCities> 26. <xsl:value-of select="TEXT"/> 27. </textCities> 28. </xsl:template> 29. </city>
So I'm trying to set variable in the 6. line, and get it in 13. What am I doing wrong?
No comments:
Post a Comment