This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: PCDATA: include section of xml ?
/ Alan Short <ashort@ilexgroup.com> was heard to say:
| hi
|
| i'm creating a docbook document using docbook.dsl
|
| I would like to include a section of xml within the document.
|
| ie.
|
| <?xml version="1.0" ?>
| <ixSchema name="VR" description="Virtual Reality">
I think the answer to what you're asking is:
<example><title>...</title>
<programlisting><![CDATA[<?xml version="1.0" ?>
<ixSchema name="VR" description="Virtual Reality">
...]]></programlisting>
</example>
In particular, you have to put <![CDATA[ ... ]]> around the markup in
your program listing. Otherwise, the XML parser sees the tags and thinks
they're supposed to be part of DocBook, which they aren't.
If you can't use <!CDATA[ (because the thing you're including uses it,
for example), you'll have to escape all the '<' and '&' characters by hand:
<example><title>...</title>
<programlisting><?xml version="1.0" ?>
<ixSchema name="VR" description="Virtual Reality">
...</programlisting>
</example>
Hope that helps.
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | Wink at small faults; for thou has
http://www.oasis-open.org/docbook/ | great ones.--Thomas Fuller (II)
Chair, DocBook Technical Committee |
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org