OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Embed XML into DocBook XML


>>>>> "Danilo Reinhardt" <dre@systemhausc.de>:

> whats the correct way to embedded a xml based file (schemata/xsd) as
> formatted/inlined "source code" into a docbook xml? Are there any
> helper programs to do this task?

(Note that this question is more suited to docbook-apps)

I have used three ways of doing this:
 1. Paste the XML source code into a <programlisting> element and
    replace all "<" characters with "&lt;"
 2. Paste the XML source code into a CDATA section inside a
    <programlisting> element, ie.
	<programlisting><![CDATA[]]></programlisting>
    The XML source then goes before the first closing bracket, eg.
	<programlisting><![CDATA[<?xml version="1.0" ?>
<myxml>
 <mysubelem/>
</myxml>
]]></programlisting>

 3. Use an <xi:include href="somefile.xml" parse="text"> inside a
    <programlisting> element.  Note that the latter means that you
    will need an XSLT processor that understands XInclude (I use
    xsltproc, which does), and that if you have a DTD or schema aware
    editor, you may need to add XInclude to your DTD.
    This is my preferred solution, because it allows me to have my
    document depend on and use "live" and tested code



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]