This is the mail archive of the
mailing list for the DocBook project.
Re: [docbook] Listing a kickstart XML file within Docbook
- From: "Martin A. Brown" <martin-docbook at wonderfrog dot net>
- To: Kerry Cox <kerryjcox at gmail dot com>
- Cc: docbook at lists dot oasis-open dot org
- Date: Thu, 18 Nov 2004 19:17:44 -0600
- Subject: Re: [docbook] Listing a kickstart XML file within Docbook
- References: <firstname.lastname@example.org>
Greetz from Madison, Wisconsin, Kerry,
: I am attempting to explain to beginning users here at my job how
: to create a kickstart file for use with Red Hat servers. As we
: use Opsware provisioning software, this kickstart XML file has
: gotten rather bulky and I am getting all sorts of errors as I
: attempt to render it under Docbook. I have tried <programlisting>
: and the <![CDATA[ ]]> tags. Regular comments do not prohibit the
: xml tags and Bash scripts within the sample XML from causing
: havoc with Docbook. I have also tried <computeroutput> and no
: success. Any suggestions for rendering XML files within Docbook?
: Thanks. I can post the file if needs be.
I have used a similar technique for including scripts (and XML
fragments), but haven't had any problem with wrapping the data in
<![CDATA[ ]]> tags.
I have done the following for incorporating bash scripts in toto.
Bash script called script.sh:
# <!-- trick an XML parser sourcing into thinking that the
# remainder of the file is but CDATA --> <![CDATA[
[ ... lots of script ... ]
# ]]> <!-- this line closes the XML CDATA tag -->
External entity definition:
<!ENTITY script SYSTEM "script.sh" >
DocBook XML inline:
What error message do you receive? About the only trouble I have
seen occurs when the included XML itself contains embedded <![CDATA[
]]> tags. That's sure to close your <![CDATA[ ]]> section much
earlier than you desired.
Martin A. Brown --- Wonderfrog Enterprises --- email@example.com