| Summary: | XslFoDocumentBuilder should apply table attributes | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Torkild Resheim <torkildr> | ||||||||
| Component: | Mylyn | Assignee: | Torkild Resheim <torkildr> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | David Green <greensopinion> | ||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | per-arnold.blaasmo | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 1.8.0 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 336905 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Torkild Resheim
Created attachment 188763 [details]
Patch to support table row and cell attributes in XslFoDocumentBuilder
This patch will apply certain table cell and row attributes to the generated XSL:FO if these attributes has been specified.
Created attachment 188764 [details]
mylyn/context/zip
From what I've seen XSL-FO doesn't support a "border" attribute on anything table-related. I referred to http://www.w3.org/TR/2006/REC-xsl11-20061205/#common-border-padding-and-background-properties and may have missed something, so please point out what if anything I'm missing. Output from the XslfoDocumentBuilder should adhere to the spec if possible, or justify why the output should use the "border" attribute. (In reply to comment #3) > From what I've seen XSL-FO doesn't support a "border" attribute on anything > table-related. I referred to > http://www.w3.org/TR/2006/REC-xsl11-20061205/#common-border-padding-and-background-properties > and may have missed something, so please point out what if anything I'm > missing. Output from the XslfoDocumentBuilder should adhere to the spec if > possible, or justify why the output should use the "border" attribute. If you look at http://www.w3schools.com/xslfo/obj_table.asp you will see a lot of border attributes that can be applied to a table. Also http://www.learn-xsl-fo-tutorial.com/Tables.cfm gives examples of using border on different levels. Agreed, there are lots of border attributes -- but none called "border". The attached patch emits a "border" attribute for table items (cells, rows, etc.) when from what I can see in the spec, there's no such attribute. (In reply to comment #6) > Agreed, there are lots of border attributes -- but none called "border". The > attached patch emits a "border" attribute for table items (cells, rows, etc.) > when from what I can see in the spec, there's no such attribute. I was using the XSL 1.0 specs and these mention that you can use "shorthands" as in CSS for specifying border properties. See http://www.w3.org/TR/2001/REC-xsl-20011015/slice5.html#shortexpan This code does produce the expected result. Great, thanks for the spec reference! That's just what I was looking for. The preferred way to apply attributes such as border is to specify it via a CSS style. This is intended to follow the evolution of the HTML spec (where border attributes are no longer standard on TR and TD elements). Changes I'd like to see in this patch: * instead of adding @border@ to both @TableCellAttributes@ and @TableRowAttributes@, use the existing @Attributes.getCssStyle()@ instead * in @XslfoDocumentBuilder@ augment @attributesFromCssStyles(String)@ to become aware of CSS that affects border * write some unit tests to verify that the border CSS is applied correctly Created attachment 201025 [details]
mylyn/context/zip
Thanks David. Will take another look. I finally got around to have another look at this one. A patch for review is at https://git.eclipse.org/r/#/c/6515/ Fixed in Change-Id: Ibdae65969fe733663966c86660ed1643d2dfab0c Thanks for the review David! |