New BIG BIG Problem

Questions about XML that are not covered by the other forums should go here.
arnaudmrs13
Posts: 19
Joined: Tue Sep 18, 2007 1:45 pm

New BIG BIG Problem

Post by arnaudmrs13 »

i have finish my docbook with Windows to explain a unix process to configure an apache server, well the result is great.

I had realized that all my listing program were copy from the original file et paste in the xml file, and i think that's the wrong way.

If I want to built another docbook, i do not win time because it's very long to copy and paste the config file of each program in xml..
Is it possible to insert the source with a command line like this in my xml file ?

Code: Select all


<commandlinsting>
"call the file which contain my config like : call apache2.conf"
</commandlinsting>
or

Code: Select all


<commandlinsting>
insert :c:/backup/serverDebian/etc/apache2/apache2.conf"
</commandlinsting>
thx :( :roll:
arnaudmrs13
Posts: 19
Joined: Tue Sep 18, 2007 1:45 pm

i have a solution but i obtain a error message

Post by arnaudmrs13 »

i m following the http://www.sagehill.net/docbookxsl/ExternalCode.html to insert an external code like this :

Code: Select all

 
<example><title>My program listing avec appel a la fonction fstab</title>
<programlisting>
<textobject>
<textdata
fileref="N:/tree/etc/fstab" />
</textobject>
</programlisting>
</example>-->

<example><title>My program listing avec appel a la fonction fstab</title>
<programlisting>
<textobject>
<textdata
fileref="http://127.0.0.1/tree/etc/fstab" />
</textobject>
</programlisting>
</example>
i have an error message with Oxygen, and i htink that's a problem of configuration

SystemID: C:\Documents and Settings\arnaud\Bureau\docbook avec external code.xml
Description: Processing terminated by xsl:message at line 486

sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

As you can read in the section about including an external text file you have to set the stylesheet parameters use.extensions and textinsert.extension to 1 and activate the DocBook extensions for your processor. For example if you use Saxon 6.5 rename saxon653.jar.ext to saxon653.jar in [oXygen-install-folder]/frameworks/docbook/xsl/extensions and restart oXygen. After that you can include the external file with an element like:

Code: Select all


  <programlisting>
<textobject>
<textdata fileref="file:///N:/tree/etc/fstab" />
</textobject>
</programlisting>
Also you can include the file with XInclude by using the attribute parse="text" on the xi:include element. In this case you do not need to set any stylesheet parameter and you do not need the DocBook extension jar file.


Regards,
Sorin
Post Reply