Wednesday, 18 September 2013

Make Xpath choose parts of an attribute

Make Xpath choose parts of an attribute

I have xml-documents with tables. Every table has an attribute hdsl-percent.
First of all, I'd like to know, what exactly that is . Never came across
it. Google didn't yield any useful results.
Now, this attribute contains the widths of the table-columns in
percentages, e.g. hsdl-percent="23.5 36.7 39.7".
Is there any way that I could get XPath to use these values for the widths
of the table-columns? So 23.5% width for the first column and so on...
The problem is that each table is different, many of them with rowspans
and colspans and since I'm using Apache FOP and it doesn't support
table-layout auto, my tables just have width="100%", no column-width
specified and therefore some columns are wider than they should be.
Thanks for your help and suggestions!

No comments:

Post a Comment