QA相关的关键字包括:qandaset,qandadiv,qandaentry,question,answer
其相关的用法举例,自己去参考官网的解释:qandaset
此处需要特别提示的是,对于qandadiv和qandaentry等,是不能随便放在某个section,sect1,para等之下使用的
我就是没注意,结果折腾了半天,始终出现错误:
org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}block" is not a valid child of "fo:root"! (See position 29:6604) javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}block" is not a valid child of "fo:root"! (See position 29:6604) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130) at org.apache.fop.cli.Main.startFOP(Main.java:174) at org.apache.fop.cli.Main.main(Main.java:205) Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}block" is not a valid child of "fo:root"! (See position 29:6604) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299) ... 3 more
结果始终不知道错在哪里,调试到最后,终于发现了,原来是qandaset等关键字,只能在chapter,article等之下使用,不能随便放在某个section,sect1,para等之下使用
所以,不要像我一样,想要在别处使用,导致始终出错,浪费了很长时间。。。