Dear list, While working on supporting LilyPond from within LyX' DocBook support, I stumbled upon a poorly defined behaviour: if the attributes are set using ' instead of ", then LilyPond ignores them.
Example (*file.lyxml*): <?xml version="1.0" encoding="UTF-8"?> <!-- This DocBook file was created by LyX 2.4.0dev See https://www.lyx.org/ for more information --> <article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m=" http://www.w3.org/1998/Math/MathML" xmlns:xi=" http://www.w3.org/2001/XInclude" version="5.2"> <title>LilyPond-book and LyX</title> <mediaobject> <textobject> <programlisting language='lilypond' role='fragment verbatim staffsize=16 ragged-right relative=2'> \relative c'' { g a b c} </programlisting> </textobject> </mediaobject> </article> To test, run *lilypond-book --format=docbook file.lyxml*. If the attributes of programlisting are encoded with ", running *lilypond-book --format=docbook file.lyxml* works as expected. Otherwise, LilyPond doesn't do anything. This is surely due to the way the DocBook parsing is done, as it only uses regular expressions instead of real XML parsing (XPath is available in ElementTree, lxml, and libxml2 modules in Python). A quick fix would be to add the possibility to have " or ' in https://github.com/lilypond/lilypond/blob/master/python/book_docbook.py#L40. Thibaut Cuvelier _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond