[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl variable/param question
So i have an xml file exported from Excel with this structure: <Row> <Cell><Data>John Doe Elementary School</Data></Cell> <Cell><Data>321-123-1234</Data></Cell> <Cell><Data>123 Cool Rd.</Data></Cell> <Cell><Data>Suite 101</Data></Cell> <Cell><Data>Mesa</Data></Cell> <Cell><Data>AZ</Data></Cell> <Cell><Data>85203</Data></Cell> </Row> and when I loop each Row... I'd like to output via xsl:message the state IF its different than the previous one... I was going to use this output to make sure my html drop down I was creating to unhide and show the location divs I'm creating for each Row was updated, but create the drop down manually now since Im not sure how to save and compare the state value for each loop. My basic xsl looks like following <xsl:template match="/"> <html><body> <xsl:apply-templates select="//Row"/> </body></html> </xsl:template> <xsl:template match="Row"> <xsl:message><xsl:value-of select="Cell[6]/Data"/></xsl:message> <div> <xsl:attribute name="class">location <xsl:value-of select="Cell[6]/Data"/></xsl:attribute> <b><xsl:value-of select="Cell[1]/Data"/></b><br/> <xsl:value-of select="Cell[2]/Data"/><br/> <xsl:value-of select="Cell[3]/Data"/><xsl:if test="normalize-space(Cell[4]/Data) != ''">, <xsl:value-of select="Cell[4]/Data"/></xsl:if><br/> <xsl:value-of select="Cell[5]/Data"/>, <xsl:value-of select="Cell[6]/Data"/>, <xsl:value-of select="Cell[7]/Data"/><br/> </div> </xsl:template>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|