Replies: 2 comments 5 replies
-
Sorry, I can't really understand what you're trying to do from this description. |
Beta Was this translation helpful? Give feedback.
-
In blocks and inlines that provide an pandoc -f markdown -t xml
# Title {xmlns:epub="xyz"} (CTRL+D) and you get: <?xml version='1.0' ?>
<Pandoc api-version="1,23,1">
<meta />
<blocks>
<Header id="title" xmlns:epub="xyz" level="1">Title</Header>
</blocks>
</Pandoc> A command line option could be useful to add a namespace to the root The outermost element you can use to declare a namespace is likely a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently started using the XML output in my project. I've created a publishing pipeline getting word documents, translating them with pandoc and a lot of lua and python scripts into several target formats (pdf over LaTeX, epub, html, ...) For several reasons I use intermediate formats to accomplish a couple of tasks (like word count, spelling via language tool, ...)
In former releases I used the json format but started to use XML as this format seems more suitable to process (combined texts, good mix between processing capability and readability).
As one of my first problems I reconized that the XML generated does not include a namespace. This is fine as long as standard (pandoc) tags are used. I failed when using epub-special tags like
epub:type
.While processing this XML, any parser used complains about a missing namespace (epub:) (see the pandoc manual about the epub:type semantics)
Is there any chance to have namespaces available or at least to have a command line parameter to add namespaces?
in addition, it might make sense to have a default pandoc namespace available to allow parsers to recognize a document as a valid pandoc XML document.
Beta Was this translation helpful? Give feedback.
All reactions