Subject: [xsl] xsl variable/param question From: Arian <armyofda12mnkeys@xxxxxxxxx> Date: Tue, 25 May 2010 10:25:57 -0400 |
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>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] generate-id() explanation, a kusa | Thread | Re: [xsl] xsl variable/param questi, David Carlisle |
Re: [xsl] generate-id() explanation, a kusa | Date | Re: [xsl] xsl variable/param questi, David Carlisle |
Month |