openSUSE / docbookrx

(An early version of) a DocBook to AsciiDoc converter written in Ruby.
MIT License
1 stars 2 forks source link

Handling entities #16

Open kkaempf opened 6 years ago

kkaempf commented 6 years ago

DocBook entities (like &version;) need to

https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions shows how to define entities at the top of the file. Top-of-file definitions are hard to implement with a streaming converter like docbookrx. Therefore, the entity definitions should go to a separate file to be included at every asciidoc header.

Actions

kkaempf commented 6 years ago

This one is hard. xmllint does it right (replacing known entities, leaving unknowns in place), but Nokogiri either complains about "unknown entity" (strict parsing) or replaces unknowns with "" :disappointed:

kkaempf commented 6 years ago

visit_entity_ref does the trick!

jcayouette commented 6 years ago

We can close this right?

kkaempf commented 6 years ago

No, we can't. Still doesn't work :disappointed: