NEWBIE : Question to display some command

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

NEWBIE : Question to display some command

Post by arnaudmrs13 »

Hello,

i'm looking for a way to put some keybord command like this :

Image

i don't know how to put a grey rectangle behind my "command syntax"

Do you have a idee ?

Thanks a lot

:( [/img]
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

You did not specify an example of XML file containing the text, the schema of your file, the stylesheet which generates the output, etc. Without such details you will not get an useful answer on a forum called "General XML questions".


Regards,
Sorin
arnaudmrs13
Posts: 19
Joined: Tue Sep 18, 2007 1:45 pm

answer to Sorin

Post by arnaudmrs13 »

sorin wrote:Hello,
You did not specify an example of XML file containing the text, the schema of your file, the stylesheet which generates the output, etc. Without such details you will not get an useful answer on a forum called "General XML questions".
Hello Sorin,

i'm sorry you're right.

So i'm using the default docbook pdf present in the software:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<article lang="fr-FR">
and i'm trying to higlight my text with this code :

Code: Select all

  
<sect1>
<title>Sécurité</title>
<itemizedlist mark='opencircle'>
<listitem>
<xsl:param name="highlight.source" select="0">Aucun mot de passe ou identifiant n'est transmis au client de manière orale, seul le fax est autorisé.</xsl:param>
<para>Aucun mot de passe ou identifiant n'est transmis au client de manière orale, seul le fax est autorisé.</para>
</listitem>
<listitem>
<para>Avant toutes modifications dans la base de compte email, vérifier la cohérence des requêtes des clients en utilisant la commande /usr/sbin/sendmail -bt adresse email sur le serveur de mail.</para>
</listitem>
</itemizedlist>
</sect1>
this option is in the reference book : "<xsl:param name="highlight.source" select="0">"

and i must use a .jar as explain here http://docbook.xml-doc.org/snapshots/xs ... ource.html

My question is to know how i could highlight my text with Oxygen Software easily ?
Is there a tips ? or a function included in the software to do that ?

Thanks a lot

Anaud[/url]
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

Do not add an xsl:param element in the XML element. Just set the param highlight.source of the Docbook XSLT stylesheet to a non-zero value, for example 1 in the Configure parameters dialog which you can open from the dialog for configuring the transformation scenario in oXygen. Also you must specify the path to the file xslthl.jar which is mentioned here in the Edit extensions dialog also opened from the scenario edit dialog.


Regards,
Sorin
arnaudmrs13
Posts: 19
Joined: Tue Sep 18, 2007 1:45 pm

Post by arnaudmrs13 »

sorin wrote:Hello,

Do not add an xsl:param element in the XML element. Just set the param highlight.source of the Docbook XSLT stylesheet to a non-zero value, for example 1 in the Configure parameters dialog which you can open from the dialog for configuring the transformation scenario in oXygen. Also you must specify the path to the file xslthl.jar which is mentioned here in the Edit extensions dialog also opened from the scenario edit dialog.
Ok Sorin, i did it but the error is "not bound"

Image

i had followed your instructions
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

The screenshot shows that you added an element xsl:param in the source XML document, that is the XML document containing the text content enclosed in Docbook elements like sect1, itemizedlist, listitem, etc and that you want to see in the output of the transformation: "Aucun mot de passe ou identifiant ...". As I said i my previous post please DO NOT add the xsl:param element in the source XML document. Just go to menu Document -> Transformation -> Configure Transformation Scenario. This action opens the Configure Transformation Scenario dialog. In this dialog press the Edit button to edit the scenario in the Edit scenario dialog. In this dialog press the Parameters button to open the Configure parameters dialog. In this dialog edit the value of the highlight.source parameter.


Regards,
Sorin
arnaudmrs13
Posts: 19
Joined: Tue Sep 18, 2007 1:45 pm

me , again

Post by arnaudmrs13 »

sorin wrote:Hello,

The screenshot shows that you added an element xsl:param in the source XML document, that is the XML document containing the text content enclosed in Docbook elements like sect1, itemizedlist, listitem, etc and that you want to see in the output of the transformation: "Aucun mot de passe ou identifiant ...". As I said i my previous post please DO NOT add the xsl:param element in the source XML document. Just go to menu Document -> Transformation -> Configure Transformation Scenario. This action opens the Configure Transformation Scenario dialog. In this dialog press the Edit button to edit the scenario in the Edit scenario dialog. In this dialog press the Parameters button to open the Configure parameters dialog. In this dialog edit the value of the highlight.source parameter.
Hello Sorin,
So this is my very simple code as exemple, and i had follow your instruction ( without the element xsl:param)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5.0b5/rng/docbookxi.rng" type="xml"?>
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0">


<chapter>
<title>Chapter Title</title>
<subtitle>Subtitle of Chapter</subtitle>
<sect1>
<title>Section1 Title</title>
<subtitle>Subtitle of Section 1</subtitle>
<para>Text</para>
<highlights>

<para>test test test test test test test test test test </para>
<para>test test test test test test test test test test </para>
<para>test test test test test test test test test test </para>
</highlights>



</sect1>
</chapter>

</book>
so i'm in menu Document -> Transformation -> Configure Transformation Scenario
the config is ok like this :

Image

so as you told me, i could generate the pdf document
and i have the same result

Image

I think that your instructions are good but i had tried to find another way.
So, to not abuse of your patience, i asked some question on the irc channel #Docbook and #docbook-fr, and someone told me that i could use a stylesheet XSLT to obtain gray color behind my text :

Image

Well, i had tryed to make it work but it didn't.t
Could you please just give me a working sample of a stylesheet XSLT very minimalist that could make the grey behind the text, or another way to do that ?

thx , Arnaud :cry: [/code]
Post Reply