Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 xalan-j_2_7_1 和 docbook-xsl-1.76.1 来生成文档。我在hibernate 文档中看到,他们在代码中使用了语法高亮。我怎样才能在我的文档中做到这一点?
查看highlight.source参数:
highlight.source
<xsl:param name="highlight.source" select="0"></xsl:param>
当此参数不为零时,样式表将尝试对程序列表元素的内容进行语法突出显示。您可以使用语言属性为每个程序列表指定语言。highlight.default.language 参数可用于为没有语言属性的程序列表指定语言。语法高亮也适用于屏幕和概要元素。
参考:DocBook XSL 样式表:参考文档