html 태그에 dir 속성값으로 rtl을 전달함
(다른 태그도 동일)
<html lang="ar" dir="rtl">
<head></head>
<body>
</body>
</html>
<xsl:template match="xhtml:html|html">
<xsl:variable name="writingMode">
<xsl:if test="@dir='rtl'">
<xsl:value-of select="'rl-tb'"/>
</xsl:if>
</xsl:variable>
<fo:root font-family="{$font.symbol}" writing-mode="{$writingMode}">
<fo:layout-master-set>
<fo:simple-page-master master-name="page">
<fo:region-body margin="1cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="page">
<xsl:apply-templates/>
</fo:page-sequence>
</fo:root>
</xsl:template>
참고
1. http://stackoverflow.com/questions/38737484/fop-foblock-container-write-mode-no-context-info-available
2. https://www.w3.org/TR/xslt
3. http://stackoverflow.com/questions/1921513/display-arabic-text-left-to-right-in-pdf-using-apache-fop-0-95
4. https://fedorahosted.org/publican/browser/datadir/xsl/html-pdf.xsl
5. https://www.antennahouse.com/support/qa/QA/2002102508.html
끝-
'Develop > XML & XSL' 카테고리의 다른 글
XSL (eXtensible Stylesheet Language) 이란? (0) | 2016.11.21 |
---|---|
XSL 간단정리 (0) | 2016.11.21 |
XSL 강좌, 레퍼런스,간단한 정리 (0) | 2016.11.21 |