Deep-Symmetry/bytefield-svg

Omit XML processing structures for generating HTML embedded SVG

brunchboy opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
When generating SVG that is to be spliced into an HTML document rather than used as a standalone file, the <?xml version…> tag, as well as the <xmlns …> and <xmlsn:svg …> tags are not necessary or valid, so it would be nice to be able to omit them.

Describe the solution you'd like
There needs to be some way to configure the generator to know that it is operating in an embedded HTML mode. Perhaps a second optional argument that is an options map? If that proves too hard, then a new var could be introduced and a def statement could be used in the diagram definition to change it, but that would force users to take care of the issue on each diagram, or if the asciidoctor-bytefield extension prepended it, then the reported source lines would all be off by one.

Additional context
The HTML checker at https://validator.w3.org/nu/ can be used to verify the solution.