3 ms·
Yes, I know. But DocBook generates fine HTML and HTML is what QtHelp shows.
by dkrajzew 4y ago
Yes, I know. But DocBook generates fine HTML and HTML is what QtHelp shows.
- moistly 4y agoAnd you should then use XSLT to transform the docbook-generated html to Qt html. It is designed for that task, no weird Python regexes and string-splitting and indentation-tracking required. IOW, choosing the right tool for the job.
- dkrajzew 4y ago:-) You insist... Yeah, look, it's hacky, yes, and maybe runs only with a certain setting. But, well, you may be right, when I think a second time about this. Thanks...
- moistly 4y agoI should note that XPath is really the key here: it’s an elegant language to get and transform tree-structured and sequential data, so it could be well-used in a Pythonic template pipeline. XSLT is a functional programming language that leans heavily on XPath to support transformation of tree-based structures. XQuery is another in the same vein. But you can accomplish the same things using an imperative language like Python, calling into XPath for data.