views:

16

answers:

1

So,

I'm trying to get the content from a cell in an ODS spreadsheet.

I'm doing something like:

<xsl:value-of select="./table:table-cell[6]/text:p/text()" disable-output-escaping="yes"/>

The nasty point is that the content of my table-cell have many line breaks and my code can't get to the full text =/

I also tried many variations from the code above but without a success. Can someone give me an advice?

Thanks ^^

+1  A: 

I'm not sure why line breaks would be a problem, unless by that you mean not literal line breaks (i.e. &#10; characters), but some kind of paragraph element similar to <p> in HTML. If it's the latter, than that might explain things, since your XPath expression does not return the text content of the element. It returns all text nodes that are immediate children of the element. If you just need the plain text content (i.e. all descendant text nodes, no matter how deep), remove /text() at the end of your XPath.

I do not understand what is the point of disable-output-escaping in your example at all. Please clarify why you think it's needed there.

Pavel Minaev