Hello all, I have used LyX on and off for many years and, working sporadically with TLDP [0], I have handled a few documents that were written in LyX. Thank you to the LyX team for your work on this tool over the years.
I have two questions today, after examining the DocBook XML output from the 2.2.x series. Question 1 ---------- Is it possible to change the public identifier for the DocBook XML 4.2 output processor to use: -//OASIS//DTD DocBook XML V4.2//EN # -- my suggestion -//OASIS//DTD DocBook XML//EN # -- current identifier [1] I have checked the XML catalogs on several different platforms and I cannot find a reference to the latter identifier, and I think it may simply be an oversight. The system identifier (the URL [2]) is correct. (You may wonder why I noticed this. Any network-connected system will likely use the system identifier to fetch the DocBook DTDs. If running 'xsltproc --nonet', then the DTDs have to be located using the public identifier, which is used as a key into the local system's XML catalogs. No matching DTD can be found for the above public identifier, hence the document cannot be processed.) I have not contributed to LyX before, though I have a checkout of the LyX git repo and could provide a patch. (If this is an acceptable change, though, then I'd be happy if anybody wished to make the change; no worries around attribution.) Question 2 ---------- When running the DocBook XML export function, I discover that not all text with '&' is not getting properly escaped with the XML entity &. There's clearly code to handle that: http://www.lyx.org/trac/browser/lyxgit/src/sgml.cpp#L46 To the best of my ability I traced down a case of a Hyperlink whose text is not properly XML-escaped. I think this is the line, but I'm not certain: http://www.lyx.org/trac/browser/lyxgit/src/insets/InsetHyperlink.cpp#L235 int InsetHyperlink::docbook(odocstream & os, OutputParams const &) const { os << "<ulink url=\"" << subst(getParam("target"), from_ascii("&"), from_ascii("&")) << "\">" << getParam("name") << "</ulink>"; return 0; } I think that getParam("name") also needs to be run through sgml::escapeString. Thank you in advance for any consideration, -Martin [0] http://tldp.org/ [1] http://www.lyx.org/trac/browser/lyxgit/src/Buffer.cpp#L2026 [2] http://www.lyx.org/trac/browser/lyxgit/src/Buffer.cpp#L2027 -- Martin A. Brown http://linux-ip.net/