मैं <fo:table>
के बाएं कॉलम में एक बड़े फ़ॉन्ट के साथ एक टेक्स्ट प्रदर्शित करना चाहता हूं। दाईं ओर वाले स्तंभों में छोटे टेक्स्ट के साथ कुछ पंक्तियां होनी चाहिए।क्या एक्सएसएल-एफओ में 'रोशन' के बराबर उपयोग करने का कोई तरीका है?
यह कैसे XSL कोड बड़ा टेक्स्ट वाले वाम-पंथी स्तंभ जोड़ने से पहले की तरह लग रहा है:
<xsl:template name="printAddress">
<xsl:param name="subDocument" />
<fo:table table-layout="fixed" background-color="#e0e0e0" keep-with-next.within-page="always">
<fo:table-column column-width="7.0cm" />
<fo:table-column column-width="7.0cm" />
<fo:table-column column-width="2.0cm" />
<fo:table-body>
<!-- Begin Row 1 -->
<fo:table-row keep-with-previous="always">
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block>Value 1</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block>Value 2</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block />
</fo:table-cell>
</fo:table-row>
<!-- Begin Row 2 -->
<fo:table-row keep-with-previous="always">
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block>
<xsl:value-of select="$subDocument/someAttribute" />
</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block>
<xsl:value-of select="$subDocument/someOtherAttribute" />
</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block />
</fo:table-cell>
</fo:table-row>
<!-- Begin Row 3 -->
<fo:table-row keep-with-previous="always">
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block>value 3</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block>Value 4</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-before="0.1cm" padding-after="0.1cm">
<fo:block>Value 5</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
मैं छोड़ दिया करने के लिए एक स्तंभ जोड़ने के लिए चाहते हैं, लेकिन मैं इसके लिए वाक्य रचना नहीं मिल रहा। HTML में ऊपर कुछ इस तरह लिखा जाएगा:
<tr>
<td>Value 1</td>
<td>Value 2</td>
<td></td>
</tr>
<tr>
<td>{someAttribute}</td>
<td>{someOtherAttribute}</td>
<td></td>
</tr>
<tr>
<td>Value 3</td>
<td>Value 4</td>
<td>Value 5</td>
</tr>
और पूरा करने के लिए जो मैं चाहता है कि हम केवल इस तरह इसे संशोधित करने की आवश्यकता होगी:
<tr>
<td rowspan="3" style="font-weight:bold;font-size:14pt">New Text</td>
<td>Value 1</td>
<td>Value 2</td>
<td></td>
</tr>
<tr>
<td>{someAttribute}</td>
<td>{someOtherAttribute}</td>
<td></td>
</tr>
<tr>
<td>Value 3</td>
<td>Value 4</td>
<td>Value 5</td>
</tr>
लेकिन यह कैसे है कि सबसे अच्छा के लिए के साथ किया जा जाएगा XSL-FO?
क्या शीर्षक एक्सएसएलटी के बजाय एक्सएसएल: एफओ का उल्लेख नहीं करना चाहिए? – ndim
जैसा कि आपने महसूस किया होगा कि मैं एक्सएसएल के लिए एक नौसिखिया हूं और मैं देख सकता हूं कि आप सही हैं। सवाल एक्सएसएल के बारे में है: एफओ और एक्सएसएलटी नहीं। धन्यवाद! – Niklas