On 27 March 2015 at 09:52, daniel anderson <[email protected]> wrote:
> Since I'm just starting looking at this tool, I have no idea what this DTD
> it's mentioning is
>

Hi Daniel,

In the process of generating PDF a2x uses several external tools which
are not part of asciidoc itself.  One of those is xmllint, a tool to
validate the docbook generated by asciidoc is legal before it is
passed to the PDF generation tools.  xmllint uses a specification of
what is legal which is called the DTD (its very complex, thats why
asciidoc leaves it to specialised tools).  If xmllint can't find the
DTD installed on your machine it tries to download it (and IIUC it
will then cache it so it doesn't have to re-download it, not sure
though).

The error you have is that xmllint cannot find the DTD locally or
download it.  Is your machine connected to the internet? Can you
access the specified URL's with a browser?  I believe you can also
install the DTD manually, but I don't know how to do that on windows.

Or you could skip the validation step by specifying --no-xmllint to a2x.

Cheers
Lex

>
> a2x: args: ['-v', '-f', 'pdf', 'foo.asc']
> a2x: resource files: []
> a2x: resource directories:
> ['/Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/images',
> '/Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/stylesheets']
> a2x: executing:
> "/Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/bin/asciidoc.py" --backend
> docbook -a "a2x-format=pdf"  --verbose  --out-file
> "/Users/daniel/tmp/foo.xml" "/Users/d
> aniel/tmp/foo.asc"
>
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/asciidoc.conf
> asciidoc: reading: /Users/daniel/tmp/foo.asc
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/docbook45.conf
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/code/code-filter.conf
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/graphviz/graphviz-filter.conf
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/latex/latex-filter.conf
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music-filter.conf
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/source/source-highlight-filter.conf
> asciidoc: reading:
> /Users/daniel/local/Darwin/Cellar/asciidoc/8.6.9/etc/asciidoc/lang-en.conf
> asciidoc: writing: /Users/daniel/tmp/foo.xml
>
> a2x: executing: "xmllint" --nonet --noout --valid
> "/Users/daniel/tmp/foo.xml"
>
> I/O error : Attempt to load network entity
> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
> /Users/daniel/tmp/foo.xml:2: warning: failed to load external entity
> "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";
> D DocBook XML V4.5//EN"
> "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";
>
> ^
> /Users/daniel/tmp/foo.xml:6: validity error : Validation failed: no DTD
> found !
> <article lang="en">
>                   ^
>
> a2x: ERROR: "xmllint" --nonet --noout --valid "/Users/daniel/tmp/foo.xml"
> returned non-zero exit status 4
>
>
>
> On Thursday, March 26, 2015 at 3:18:55 PM UTC-7, Lex Trotman wrote:
>>
>> Try a2x -v to get more information.
>>
>> Cheers
>> Lex
>>
>> On 27 March 2015 at 07:36, daniel anderson <[email protected]> wrote:
>> >
>> >
>> >
>> > In foo.asc
>> >
>> > = Document Title (level 0) =
>> >
>> >
>> > testing something or other
>> >
>> >
>> >
>> > And when I try to generate a PDF (homebrew install asciidoc on osx)
>> >
>> > [~/tmp]$ a2x -f pdf foo.asc
>> > a2x: ERROR: "xmllint" --nonet --noout --valid
>> > "/Users/daniel/tmp/foo.xml"
>> > returned non-zero exit status 4
>> >
>> >
>> >
>> > What am I doing wrong?
>> >
>> > Thanks in advance
>> >
>> >
>> > --
>> > 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.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to