[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath Against OpenXML and OpenOffice Spreadsheets?
Hi, Ronnie
I've done quite a bit of XSLT work against both OpenOffice and Excel, and what you describe is certainly possible. If you want to run them together (hard to imagine the case where you would), you'd do: <xsl:value-of select="path/to/your/column[string-length(.) > 20]"/> If you want each value on its own line, you could do: <xsl:template match="path/to/your/column[string-length(.) > 20]"> <xsl:value-of select="."/><xsl:text> </xsl:text> </xsl:template> or <xsl:for-each select="path/to/your/column[string-length(.) > 20]"> <xsl:value-of select="."/><xsl:text> </xsl:text> </xsl:for-each> If you need to process the same nodes with some other template as well, you can add a mode to one or the other template. Remember that both Excel and OpenOffice have multiple namespaces, so your path statement will be much longer, but that's the general idea. (I didn't test any of that, so it might suffer from a typo or something.) HTH Jay Bryant ----- Original Message ----- From: "Ronnie Royston" <rhroyston@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, June 03, 2008 3:34 PM Subject: XPath Against OpenXML and OpenOffice Spreadsheets? All I need to do is retrieve the string value of every cell of column "A" whose string length is greater than 20 characters in length.
|
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
|