On 7 April 2013 18:59, Dan Allen <[email protected]> wrote: > At the moment, Asciidoctor does not validate the XML that it produces when > using the DocBook backend. However, the battery of tests in the project > ensure that it does produce the output that is expected (assuming the > AsciiDoc input is reasonable). >
The actual question was regarding input reasonableness checking, sorry to confuse you, I was using DTD as a general term, not specifically as a reference to the output XML. Since I asked the question, I have had time to look on the asciidoctor discussion forum and I noticed the discussion of outputting an AST, so I presume you have that whole document structure available. The question is then do you have/are you considering, the facility to check this against some sort of, lets use the term "rules" instead of DTD :). > > When I get around to adding PDF support directly into Asciidoctor, I will > need to validate the XML. The most popular XML library in Ruby is Nokogiri, > which is libxml2 / libxslt, which is exactly what AsciiDoc uses. Therefore, > it's going to map pretty much 1-to-1...which is a core goal of Asciidoctor > anyway. > But thats useful to know anyway. What are you planning to use for PDF generation? > > -Dan > > p.s. The one glaring difference between AsciiDoc and Asciidoctor is how > the backends are done. I did not implement support for the AsciiDoc > configuration syntax, but for good reason. I don't like doing backends that > way and many people I know agree. Using the Ruby template languages (Haml, > Slim, ERB, etc) is a much more approachable strategy, and will translate to > other languages too since those formats are supported in Java and > JavaScript as well. Plus, they are self-validating since they won't output > bad *ML. > To some extent the conf files arrangement is part of "Asciidoc" in that people can define their own additional translations, but it always is going to be implementation specific, Asciidoc conf files are a format thats easy to handle with Python, Ruby templates are, well, Ruby, and associated application areas. Other application areas (somewhat further away from web based systems than Java/Javascript) have never heard of Ruby templates and would use their own :). There isn't really a template system, that I know of, that is implemented in a wide range of languages sadly. So I guess each Asciidoc implementation is going to have its own extension method and they are not going to be portable. This isn't good for users though, since they are tied to specific implementations, but I don't know what the solution is. > > > > On Sun, Apr 7, 2013 at 1:40 AM, Lex Trotman <[email protected]> wrote: > >> >> >> Dan, >> >> Question inspired from the other thread, does asciidoctor enforce any >> DTD? And if so how is it defined and modified? >> >> Cheers >> Lex >> >> On 7 April 2013 09:50, Dan Allen <[email protected]> wrote: >> >>> Charles, >>> >>> At the moment, Asciidoctor can convert to HTML (matches the html5 >>> backend in AsciiDoc), DocBook, deck.js and dzslides. >>> >>> The conversion to PDF and ePub is handled the same way as in AsciiDoc, >>> so you just run the a2x tool on the DocBook output. (The goal is to >>> eventually do those conversions without a2x). >>> >>> The short answer to your question is yes (except for slidy). >>> >>> -Dan >>> >>> P.s. To create new backends, see the backends repo under >>> http://github.com/asciidoctor >>> >>> -- >>> Sent from my CyanogenMod-powered >>> Android device, an open platform for >>> carriers, developers and consumers. >>> On Apr 6, 2013 5:36 AM, "Charles Beck" <[email protected]> wrote: >>> >>>> Does ASCIIDoctor can convert to HTML, PDF, ePub, and Slidy (HTML5 >>>> slice) ? >>>> >>>> http://asciidoctor.org/ >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "asciidoc" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at http://groups.google.com/group/asciidoc?hl=en. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "asciidoc" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/asciidoc?hl=en. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "asciidoc" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/asciidoc?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Dan Allen > Principal Software Engineer, Red Hat | Author of Seam in Action > Registered Linux User #231597 > > http://google.com/profiles/dan.j.allen > http://mojavelinux.com > http://mojavelinux.com/seaminaction > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/asciidoc?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/asciidoc?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
