Technologies XML / XSL-FO / Référence / Attributs de XSL-FO / column-width
(Extrait de « XSL-FO ― Die Referenz » de Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Section de la recommandation : 7.28.9
Catégorie : 7.28 Propriétés des tableaux
Description
Cet attribut définit la largeur des colonnes de table (<fo:table-cell>). Elle peut être relative à la largeur totale de la table, aux autres colonnes ou être une mesure absolue (length).
Valeurs
percentage | La largeur d’une colonne peut être définie par rapport à la largeur totale de la table par un nombre, éventuellement négatif ou décimal, suivi du signe de pourcentage (%). |
length | La largeur d’une colonne peut être définie par une mesure absolue. La valeur doit être un nombre, éventuellement négatif ou décimal, suivi d’une unité (em, ex, px, pt, in, cm, mm, pc). |
Valeur de fonction | La fonction proportional-column-width() définit les largeurs de colonnes les unes par rapport aux autres. Selon la recommandation du W3C, la table (<fo:table>) doit utiliser une disposition fixe (table-layout="fixed") pour cette fonction. |
Version XSL-FO : 1.0
Autorisé dans :
Cet élément permet de définir les propriétés des cellules d’une même colonne. |
Prise en charge :
Niveau de conformité | Antenna House | FOP | RenderX XEP | Altsoft XML2PDF | Compart DocBridge |
De base | O | O | O | O | O |
Exemple XSL-FO :
<fo:root font-family="Arial" font-size="10pt" line-height="1.2em" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm
0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="26mm 55mm 41mm
55mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten">
<fo:flow flow-name="xsl-region-body">
<fo:table-and-caption>
<fo:table>
<fo:table-column column-width="40mm" border-style="solid"/>
<fo:table-column column-width="25mm" border-style="dotted"/>
<fo:table-header text-align="center" border-style="solid">
<fo:table-cell>
<fo:block font-weight="bold">
Auto
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-weight="bold">
Preis
</fo:block>
</fo:table-cell>
</fo:table-header>
<fo:table-body text-align="center">
<fo:table-row>
<fo:table-cell border-style="dotted" border-width="1mm">
<fo:block>
Audi
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
777
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
Mercedes
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
777
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
</fo:flow>
</fo:page-sequence>
</fo:root>Dans la sortie :
Extrait de la recommandation du W3C :