【背景】
折腾:
【记录】把docbook中的html的css的配置效果应用到fo即PDF等输出文件类型中
期间,需要试试,去用:
去看看能否实现:
将css,转换为对应的fo的xsl配置。
【折腾过程】
1.去sourceforge主页看看:
http://sourceforge.net/projects/css2xslfo/
找到最新版:
http://sourceforge.net/projects/css2xslfo/files/css2xslfo/1.6.2/
先去下载那个:
另外也下载:
供后续我此处是FOP 1.0去使用。
2.参考:
去尝试用用看看。
结果不会:
Starting /bin/bash.exe CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar /home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml D:\home\CLi\develop\docbook\books\docbook_dev_note\src\docbook_dev_note.xml (The system cannot find the path specified) CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\docbook\books\docbook_dev_note\src\docbook_dev_note.xml D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\docbook\config\css\css_to_fo\tmptmp_dev_rootcgwinhomeCLidevelopdocbookbooksdocbook_dev_notesrcdocbook_dev_note.xml (The system cannot find the file specified) CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml file:/home/CLi/develop/docbook/config/css/docbook_crl.css can't be opened. CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -h Usage: be.re.css.CSSToXSLFO [-h]: show this help [-baseurl url]: base URL [-c url_or_filename]: catalog for entity resolution [-config url_or_filename]: extra configuration [-debug]: debug mode [-fo filename]: output file, uses stdout by default [-p url_or_filename_comma_list]: preprocessors [-uacss url_or_filename]: User Agent style sheet [-v]: turn on validation [url_or_filename]: the input document, use stdin by default [parameter=value ...] User Agent parameters: column-count (default: 1) country (default: GB) font-size (default: 10pt for a5 and b5, otherwise 11pt) html-header-mark: an HTML element (default: none) language (default: en) odd-even-shift (default: 10mm) orientation (default: portrait; other: landscape) paper-margin-bottom (default: 0mm) paper-margin-left (default: 25mm) paper-margin-right (default: 25mm) paper-margin-top (default: 10mm) paper-mode (default: onesided; other: twosided) paper-size (default: a4; others: a0, a1, a2, a3, a5, b5, executive, letter and legal) rule-thickness (default: 0.2pt) writing-mode (default: lr-tb)
3.参考:
去试试:
CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml unknown protocol: d CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml -pdf docbook_dev_note.pdf Usage: be.re.css.CSSToXSLFO [-h]: show this help [-baseurl url]: base URL [-c url_or_filename]: catalog for entity resolution [-config url_or_filename]: extra configuration [-debug]: debug mode [-fo filename]: output file, uses stdout by default [-p url_or_filename_comma_list]: preprocessors [-uacss url_or_filename]: User Agent style sheet [-v]: turn on validation [url_or_filename]: the input document, use stdin by default [parameter=value ...] User Agent parameters: column-count (default: 1) country (default: GB) font-size (default: 10pt for a5 and b5, otherwise 11pt) html-header-mark: an HTML element (default: none) language (default: en) odd-even-shift (default: 10mm) orientation (default: portrait; other: landscape) paper-margin-bottom (default: 0mm) paper-margin-left (default: 25mm) paper-margin-right (default: 25mm) paper-margin-top (default: 10mm) paper-mode (default: onesided; other: twosided) paper-size (default: a4; others: a0, a1, a2, a3, a5, b5, executive, letter and legal) rule-thickness (default: 0.2pt) writing-mode (default: lr-tb) CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2fopnew1_6_2.jar D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml -pdf docbook_dev_note.pdf java.lang.NoClassDefFoundError: org/apache/fop/apps/FOUserAgent at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2442) at java.lang.Class.getMethod0(Class.java:2685) at java.lang.Class.getMethod(Class.java:1620) at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486) Caused by: java.lang.ClassNotFoundException: org.apache.fop.apps.FOUserAgent at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 6 more Exception in thread "main" CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ echo $FOP_HOME /home/CLi/develop/docbook/tools/fop CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2fopnew1_6_2.jar;D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml -pdf docbook_dev_note.pdf java.lang.NoClassDefFoundError: org/apache/fop/apps/FOUserAgent at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2442) at java.lang.Class.getMethod0(Class.java:2685) at java.lang.Class.getMethod(Class.java:1620) at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486) Caused by: java.lang.ClassNotFoundException: org.apache.fop.apps.FOUserAgent at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 6 more Exception in thread "main" D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 1: $'PK\003\004': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 2: META-INF/▒▒PK: No such file or directory D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 104: $'\254M\272\263n\312o\372\235=\320VCl\243\207v\243\315I@\307\375\037:\036\202+x\235\264M\355\241\351i\250.\256d\321q1\320\373\272\226\263\240\n\344Z\356\320\366\273\367\005PK\003\004': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 3: syntax error near unexpected token `$'\204\245?'' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 3: `w▒▒▒▒(▒▒?(t5R▒ ▒X/w▒▒ߟ9▒▒x▒▒▒▒~▒▒▒i▒9G!+lP▒▒|▒▒▒▒▒▒9Э▒o0▒X▒▒▒ ▒▒▒▒▒▒▒▒'▒▒ӥ▒9▒▒U%▒e▒▒▒ K▒▒N▒}▒▒xޣ▒ ▒▒▒▒z▒ ▒▒▒▒▒PK' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 3: $'s#\350\234L\a\252\310,\365\3041G\021\303z\343': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 4: syntax error near unexpected token `)' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 4: `▒8▒g▒)▒▒▒▒▒▒e*▒▒w▒[▒ a)▒▒ύO▒▒,▒V▒▒9▒6▒▒u~c#PK' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 3: syntax error near unexpected token `$'\204\245?'' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 3: `w▒▒▒▒(▒▒?(t5R▒ ▒X/w▒▒ߟ9▒▒x▒▒▒▒~▒▒▒i▒9G!+lP▒▒|▒▒▒▒▒▒9Э▒o0▒X▒▒▒ ▒▒▒▒▒▒▒▒'▒▒ӥ▒9▒▒U%▒e▒▒▒ K▒▒N▒}▒▒xޣ▒ ▒▒▒▒z▒ ▒▒▒▒▒PK' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 3: $'s#\350\234L\a\252\310,\365\3041G\021\303z\343': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 4: syntax error near unexpected token `)' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: command substitution: line 4: `▒8▒g▒)▒▒▒▒▒▒e*▒▒w▒[▒ a)▒▒ύO▒▒,▒V▒▒9▒6▒▒u~c#PK' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 3: Щ~▒xMETA-INF/MANIFEST.MFe▒▒O▒0▒▒#▒▒▒a7IYAy▒ ▒▒▒▒▒▒▒▒\▒,▒▒▒l▒▒s9[q▒▒▒[▒▒BI▒8▒▒IU▒y▒C▒▒Ir▒f,K'I▒f▒▒▒▒l▒▒_gҔm▒)▒▒; ▒wd|▒'▒¦WS▒▒▒▒9|/▒8▒#▒sX [▒3▒▒o▒▒Aأ▒u$+▒▒֊▒▒>3:▒▒WX/▒▒P▒▒▒▒R▒▒▒▒$4▒鉮LUI]▒▒CphCVں▒ph▒P▒-▒B▒▒H}о(▒▒▒ %▒QI▒▒@7oZՋ▒̮QL▒▒Ѱ Oh▒9▒▒▒▒▒A▒▒hkY8▒▒▒▒qG▒h▒▒j▒▒Ռ |G▒ ▒▒%A!▒▒WT▒s▒i▒P▒▒4▒ɐ▒▒ۅ▒▒▒▒▒▒<▒▒=▒5▒!▒x=▒▒▒ PK A▒▒<▒3a▒y▒0META-INF/services/org.apache.fop.render.Renderer▒▒A ▒@ ▒yw(ʈ▒J▒▒▒▒-▒▒▒▒▒;▒E▒▒▒▒IRc▒P^VȐA▒p▒: No such file or directory D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 105: ▒ɓXR▒2META-INF/services/org.apache.fop.render.XMLHandler▒/J▒K,HL▒H▒K▒/▒+J▒KI-▒+HI▒ pq s▒H▒K▒I-▒▒Ǯ▒X/: No such file or directory D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 106: $'\364\034\335\002\220\324\001PK\003\004': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 107: ▒r▒▒[: No such file or directory D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 107: META-INF/services/org.apache.fop.render.afp.AFPImageHandler▒/J▒K,HL▒H▒K▒/▒+J▒KI-▒KL+▒st ▒▒MLO▒H▒K▒I-: No such file or directory D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 108: $'\002\313\244\246\200\305\270\362\211\326\226X\356\354\354\031\022\342\226XA\222\246\340\222\242\324\304\342\265\270\027%\026dd': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 109: ▒▒ׇ PK A▒▒<r▒P▒tfFMETA-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler▒▒;1 ▒▒▒|,VO▒tӸG▒v{)▒C▒: No such file or directory Eў▒x▒Q`$@▒▒ D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 110: $'\306-\261\201\246\f8\205\251\307O\3456N\324Ra\273\320\213m\327\267E,\200\207\263C\334eTR\270\315\301\363\363Wx=z\342\336\200\213cOYa\037\320!\244\r\266\312Ih0\314aa\023*\362]\321\017PK\003\004': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 111: ▒%▒Y▒: No such file or directory D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 111: META-INF/services/org.apache.fop.render.pdf.PDFImageHandler▒/J▒K,HL▒H▒K▒/▒+J▒KI-▒+HI▒ pq▒▒MLO▒H▒K▒I-: No such file or directory D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 112: $'J,\367': command not found D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 131: syntax error near unexpected token `)' D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/fop/build/fop.jar: line 131: `▒▒▒<$'▒|ι▒▒▒~▒▒▒ <▒▒np'▒▒ ▒A▒▒5▒▒Xdf▒eP{eh▒B4 ▒T""▒Q▒O▒▒▒▒=C▒c▒#~▒▒e▒:▒▒ύ▒▒xE▒W▒/r{$1▒▒V▒L▒GI▒31▒]▒"'▒z▒▒▒▒wk▒:▒f▒D*▒1:▒Ȉ▒XɌ{%▒▒i▒▒▒=߿▒Y▒▒q▒▒.Y▒;▒b▒[▒5*▒ܱ▒▒?▒LT▒@▒0▒▒R*▒▒▒ԣ▒v▒Lɾ▒▒%▒)lȠ▒▒▒▒]▒G▒l▒▒a▒▒▒g▒▒▒▒=▒E▒▒r▒pubأB▒▒▒▒▒▒a▒TפК▒=▒1▒#LR▒▒ ▒Kk>nwOް▒1E▒▒Q<D3▒@▒g▒}▒~g▒9ZνJ▒▒/P▒' CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $
还是不行。
没有搞懂如何使用的。
4.后来折腾,用:
CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml
是可以生成:
docbook_dev_note.fo
但是是0KB。。
加上-debug的那个命令,可以生成中间一堆的文件,但是都没用。
5.这会稍微有点懂了:
css2xslfo.jar:是将xsl转换fo的;
而如果用其他几个,比如fop的:
css2fopnew.jar:则就是,在xsl转fo的基础上,再用fop将fo转换为pdf,所以才有css2fopnew.jar有对应的-pdf指定输出pdf文件的参数的。
而对应的css2xslfo.jar,只有-fo,指定输出的fo的文件名。
然后对应的,共有的参数-p,用于指定此处用到的xsl文件。
与此相对应的:
我之前,是用xsltproc,输入xml,转换输出为fo文件,其中也有输入xsl文件的配置选项;
在用fop将fo文件,转换为pdf文件的。
6.而如果的确去用xsl的话,此处会出现各种问题:
CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: '\home\develop\docbook\tools_root\docbook-xsl-ns-1.78.1\fo\docbook.xsl (The system cannot find the path specified)' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml Compiler warnings: file:///d:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/docbook-xsl-ns-1.78.1/fo/table.xsl: line 459: Attribute 'border-start-style' outside of element. file:///d:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/docbook-xsl-ns-1.78.1/fo/table.xsl: line 460: Attribute 'border-end-style' outside of element. file:///d:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/docbook-xsl-ns-1.78.1/fo/table.xsl: line 461: Attribute 'border-top-style' outside of element. file:///d:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/docbook-xsl-ns-1.78.1/fo/table.xsl: line 462: Attribute 'border-bottom-style' outside of element. file:///d:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/docbook-xsl-ns-1.78.1/fo/index.xsl: line 352: Attribute 'rx:key' outside of element. ERROR: 'The first argument to the non-static Java function 'insertCallouts' is not a valid object reference.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: 'file:/D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl.xsl: line 48: Template 'border' not defined in this stylesheet.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: 'file:/D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl.xsl: line 48: Template 'border' not defined in this stylesheet.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: 'file:/D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl: line 21: Template 'object.id' not defined in this stylesheet.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: 'file:/D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl: line 24: Variable or parameter 'body.fontset' is undefined.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: 'file:/D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl: line 25: Variable or parameter 'title.fontset' is undefined.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: 'file:/D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl: line 24: Template 'simple.xlink' not defined in this stylesheet.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet CLi@PC-CLI-1 ~/develop/docbook/config/css/css_to_fo $ java -jar css2xslfo1_6_2.jar -debug -p D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl -fo docbook_dev_note.fo D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/books/docbook_dev_note/src/docbook_dev_note.xml ERROR: 'file:/D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.78.1/fo/docbook_crl_for_css2fo.xsl: line 32: Template 'anchor' not defined in this stylesheet.' FATAL ERROR: 'Could not compile stylesheet' Could not compile stylesheet
看来是,此处的jar包,不支持docbook中的各种的xsl配置,
至少是不兼容,所以没法用。
所以,此处只能放弃使用这个:
了。
【总结】
目前,还是不会用CSSToXSLFO。
不知道如何将css转换为fo即pdf的配置参数。
转载请注明:在路上 » 【记录】docbook中尝试使用CSSToXSLFO将css转换为fo(pdf)的xsl配置参数