Re: [docbook-apps] Long programlisting

From
<>
Date
2011-06-06T15:26:05+00:00
ID
Thread
Re: [docbook-apps] Long programlisting
Dave,

 

To xinclude text files in programlisting:

 

  <programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude"    href="MyFile.txt" 
parse="text" /></programlisting

 

And then make sure you have a something like this in your mod files:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT xi:include 
(xi:fallback?) >
<!ATTLIST xi:include
    
xmlns:xi   CDATA       
#FIXED    "http://www.w3.org/2001/XInclude"
    
href       
CDATA       #REQUIRED
    
parse      (xml|text)  "xml"
    
encoding   CDATA       #IMPLIED 

    
xpointer            
CDATA       #IMPLIED
    
accept              
CDATA       #IMPLIED
    
accept-charset      
CDATA       #IMPLIED
    
accept-language     
CDATA       #IMPLIED > 
    

    <!ELEMENT xi:fallback ANY>
    
<!ATTLIST xi:fallback
    xmlns:xi   
CDATA   #FIXED   "http://www.w3.org/2001/XInclude" 
>
    
    <!-- inside part 
elements -->
    <!ENTITY % 
local.info.class       "| xi:include" > 

    <!ENTITY % local.preface.class    "| 
xi:include" >
    <!ENTITY % 
local.part.class       "| xi:include" 
>
    <!ENTITY % local.chapter.class    
"| xi:include">
    <!ENTITY % 
local.section.class    "| xi:include">
    
<!-- inside chapter or section elements -->
    
<!ENTITY % local.appendix.class   "| 
xi:include">
    <!-- inside appendix elements 
-->
    <!ENTITY % local.divcomponent.mix "| 
xi:include">
    <!-- inside para, programlisting, 
literallayout, etc. -->   
    <!ENTITY % 
local.para.char.mix    "| xi:include">
    
<!-- inside bookinfo, chapterinfo, etc. -->      

    <!ENTITY % 
local.info.class       "| 
xi:include">         

    <!-- inside sets -->      

    <!ENTITY % 
local.book.class       "| 
xi:include">         

    <!ENTITY % 
local.set.class        "| 
xi:include">   
          

    

 

 

Regards,

Dean Nelson

 

In a message dated 6/6/2011 7:49:31 A.M. Pacific Daylight Time, 
 writes:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is the 
  programlisting in an <example>? If so, you can either change 
  the
default for examples or use <?dbfo 
  keep-together="auto"?>:

http://lists.oasis-open.org/archives/docbook-apps/201103/msg00046.html
http://www.sagehill.net/docbookxsl/PageBreaking.html

David

On 
  06/06/2011 09:40 AM, davep wrote:
> Output pdf,
> 
> I've 
  crashed xep with a 'two page' or more programlisting?
> Are these split 
  at all please?
> 
> If so how might it be done?
> 
> 
  I'd like to xinclude the file (as text) rather than 
  copy/past/s/replace
> 
> 
> regards
> 
  

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 
  (GNU/Linux)
Comment: Using GnuPG with Mozilla - 
  http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJN7OjbAAoJEMHeSXG7afUhOnMIAJRgeqdMWMXgTCSGKHMfQNB5
nKjdJTbMf05sNLbF02HLzop519E1VEHVSEJRI2CzWRsNkHbJZOh/8XkgpEW9s+jc
0XQp1clQpBQpjPjp1JQL4l40YS0IArwBwEP6se8SUlaC1jc4Tmle6Jm8dqBfHpBv
qa4D4+hgFMDXkXAc1U/3NDf1mV8rdE3kU3Fg6zemmZpNJYxkLXDiiSoQ9XV0QjDU
OGBumqvVWnaTCobZwVX1PCwYNL/+dd4OzEaUYs/vRgWhl3fiNsOYkSqvU4Xi2N4e
28DD2tATdcMp2O0oLgxlWVvN10W8MczVJ/cha+XUvhcrwPdSUd0aWHAV/bLiYBg=
=z9Bc
-----END 
  PGP 
  SIGNATURE-----

---------------------------------------------------------------------
To 
  unsubscribe, e-mail: 
For 
  additional commands, e-mail: