Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > DocBook getting started (with xmlto in Redhat Linux)

Reply
Thread Tools

DocBook getting started (with xmlto in Redhat Linux)

 
 
Dr. Laurence Leff
Guest
Posts: n/a
 
      08-17-2003
I am having trouble doing the basics with xmlto on Redhat to convert
DocBook XML into the various files.

I believe the problem is the first line on the files:

Here is starter file (notes.xml):

<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
<!ENTITY chap1 SYSTEM "chap1.xml">
<Book><title>CS310 notes</title></BOOK>
&chap1;

Here is the chap1.xml file:


<!DOCTYPE Chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
<Chapter id="ch1"><title>Binary Numbers and the Layers of Computer Organization</TITLE>
<para>
This course deals with several layers that are used to construct
all computers.
<orderedlist Numeration="Arabic">
<listitem>
At the top is a
... stuff deleted to save space ...
</Chapter>

Here is the results when I try xmlto.
I couldn't get xmlto pdf notes.xml to work either.

Thanks for helping me get started with docbook by telling me what
practical detail I neglected.

Dr. Laurence Leff Western Illinois University, Macomb IL 61455 ||(309) 298-1315
Stipes 447 Assoc. Prof. of Computer Sci. Pager: 309-367-0787 FAX: 309-298-2302
Secretary: The OASIS Legal XML Member Section Court Filing Technical Committee
and Electronic Contracts Technical Committee

__________________________________________________
sh-2.05b$ xmlto -v ps notes.xml
Format script: /usr/share/xmlto/format/docbook/ps
Convert to XSL-FO
Stylesheet: http://docbook.sourceforge.net/relea...fo/docbook.xsl
xsltproc --nonet --xinclude \
-o /tmp/xmlto.TFjwM6/notes.proc \
http://docbook.sourceforge.net/relea...fo/docbook.xsl \
/home/leff/310/notes.xml
/home/leff/310/notes.xml:1: error: Space required after the Public Identifier
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
^
/home/leff/310/notes.xml:1: error: SystemLiteral " or ' expected
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
^
/home/leff/310/notes.xml:1: error: xmlParseExternalID: PUBLIC, no URI
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
^
/home/leff/310/notes.xml:2: error: xmlParseStartTag: invalid element name
<!ENTITY chap1 SYSTEM "chap1.xml">
^
/home/leff/310/notes.xml:2: error: Extra content at the end of the document
<!ENTITY chap1 SYSTEM "chap1.xml">

 
Reply With Quote
 
 
 
 
Bob Foster
Guest
Posts: n/a
 
      08-17-2003
Neither of the quoted fragments come from well-formed XML files. In an XML
file, a system identifier is required, e.g., in the doctype declarations
where you have only public identifiers. Element names are case-sensitive.
"<book>" not "<Book>". "</book>" not "</BOOK>". "</title>" not "</TITLE>".
Looks like you have some fixing to do before you can start to have problems
with XSLT.

Bob Foster

"Dr. Laurence Leff" <(E-Mail Removed)> wrote in message
news:bhoejq$i93$(E-Mail Removed)...
> I am having trouble doing the basics with xmlto on Redhat to convert
> DocBook XML into the various files.
>
> I believe the problem is the first line on the files:
>
> Here is starter file (notes.xml):
>
> <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
> <!ENTITY chap1 SYSTEM "chap1.xml">
> <Book><title>CS310 notes</title></BOOK>
> &chap1;
>
> Here is the chap1.xml file:
>
>
> <!DOCTYPE Chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
> <Chapter id="ch1"><title>Binary Numbers and the Layers of Computer

Organization</TITLE>
> <para>
> This course deals with several layers that are used to construct
> all computers.
> <orderedlist Numeration="Arabic">
> <listitem>
> At the top is a
> ... stuff deleted to save space ...
> </Chapter>
>
> Here is the results when I try xmlto.
> I couldn't get xmlto pdf notes.xml to work either.
>
> Thanks for helping me get started with docbook by telling me what
> practical detail I neglected.
>
> Dr. Laurence Leff Western Illinois University, Macomb IL 61455 ||(309)

298-1315
> Stipes 447 Assoc. Prof. of Computer Sci. Pager: 309-367-0787 FAX:

309-298-2302
> Secretary: The OASIS Legal XML Member Section Court Filing Technical

Committee
> and Electronic Contracts Technical Committee
>
> __________________________________________________
> sh-2.05b$ xmlto -v ps notes.xml
> Format script: /usr/share/xmlto/format/docbook/ps
> Convert to XSL-FO
> Stylesheet:

http://docbook.sourceforge.net/relea...fo/docbook.xsl
> xsltproc --nonet --xinclude \
> -o /tmp/xmlto.TFjwM6/notes.proc \
> http://docbook.sourceforge.net/relea...fo/docbook.xsl \
> /home/leff/310/notes.xml
> /home/leff/310/notes.xml:1: error: Space required after the Public

Identifier
> <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
> ^
> /home/leff/310/notes.xml:1: error: SystemLiteral " or ' expected
> <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
> ^
> /home/leff/310/notes.xml:1: error: xmlParseExternalID: PUBLIC, no URI
> <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
> ^
> /home/leff/310/notes.xml:2: error: xmlParseStartTag: invalid element name
> <!ENTITY chap1 SYSTEM "chap1.xml">
> ^
> /home/leff/310/notes.xml:2: error: Extra content at the end of the

document
> <!ENTITY chap1 SYSTEM "chap1.xml">
>



 
Reply With Quote
 
 
 
 
Dr. Laurence Leff
Guest
Posts: n/a
 
      08-17-2003
As I wrote earlier, I am having trouble doing the basics with xmlto on Redhat
to convert DocBook XML into the various files.

I believe I fixed the problem with my DOCTYPE lines. They now read as follows:

NOTES.XML:


<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY chap1 SYSTEM "chap1.xml">
]>
<Book><title>CS310 notes</title>
&chap1;
</Book>

chap1.xml:


<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<chapter id="ch1"><title>Binary Numbers and the Layers of Computer Organization</title>
<para>
This course deals with several layers that are used to construct
all computers.
<orderedlist Numeration="Arabic">
<listitem>
At the top is a
*** - stuff deleted to save space ---
</listitem>
</orderedlist>
</chapter>



)))))))))))))))))))))))))))))))))
Now, I just have trouble with the beginning of the included file.
Here is my error message.

Convert to XSL-FO
/home/leff/310/chap1.xml:1: error: xmlParseStartTag: invalid element name
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis
^
 
Reply With Quote
 
Christopher Cooper
Guest
Posts: n/a
 
      08-17-2003
In the future, try: http://lists.oasis-open.org/archives/docbook-apps/

I don't think you will get xmlto to work, because you don't have a valid
a valid XML document.

This is what I whipped up, using your info:

<?xml version='1.0' ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY chap1 SYSTEM "chap1.xml">
]>
<book>
<bookinfo>
<title>CS310 notes</title>
</bookinfo>

&chap1;
</book>


//---------------------------------------------------------------------------//

<?xml version='1.0' ?>
<chapter id="ch1">
<title>Binary Numbers and the Layers of Computer Organization</title>
<para>This course deals with several layers that are used to construct
all computers.</para>

<itemizedlist>
<listitem>
<indexterm>
<primary>At the top is a</primary>
</indexterm>

<indexterm>
<primary> ... stuff deleted to save space ...</primary>
</indexterm>
</listitem>
</itemizedlist>
</chapter>


I hope this works for you and good luck!

Dr. Laurence Leff wrote:
> As I wrote earlier, I am having trouble doing the basics with xmlto on Redhat
> to convert DocBook XML into the various files.
>
> I believe I fixed the problem with my DOCTYPE lines. They now read as follows:
>
> NOTES.XML:
>
>
> <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
> <!ENTITY chap1 SYSTEM "chap1.xml">
> ]>
> <Book><title>CS310 notes</title>
> &chap1;
> </Book>
>
> chap1.xml:
>
>
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
> <chapter id="ch1"><title>Binary Numbers and the Layers of Computer Organization</title>
> <para>
> This course deals with several layers that are used to construct
> all computers.
> <orderedlist Numeration="Arabic">
> <listitem>
> At the top is a
> *** - stuff deleted to save space ---
> </listitem>
> </orderedlist>
> </chapter>
>
>
>
> )))))))))))))))))))))))))))))))))
> Now, I just have trouble with the beginning of the included file.
> Here is my error message.
>
> Convert to XSL-FO
> /home/leff/310/chap1.xml:1: error: xmlParseStartTag: invalid element name
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis
> ^


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DocBook: Pass DocBook-Path to Stylesheet tthunder@gmx.de XML 1 11-27-2007 12:08 AM
Novice - trying to get started with docbook Jim Anderson XML 12 02-15-2006 02:33 AM
Can someone try this on RedHat Linux/jre1.5 or redhat linux/jdk1.6? U. George Java 4 08-11-2005 12:33 PM
Transform XML docbook to HTML with docbook stylesheet Antonio Amato XML 2 11-18-2004 05:08 PM
DocBook Simple Table Problem (using xmlto) Dr. Laurence Leff XML 0 09-04-2003 06:55 PM



Advertisments