This is the mail archive of the mailing list for the DocBook project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook] Listing a kickstart XML file within Docbook

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

  # <!-- 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   ""    >

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.

Good luck!


Martin A. Brown --- Wonderfrog Enterprises ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]