On Monday 05 June 2006 09:57, Pete Phillips wrote:
> I want to use <markup> or <code> in a docbook document to give examples
> of how to mark up various elements of bibliography references in xml.
>
> Therefore I don't want these sections processed, just printed as they
> are, perhaps in typewriter-style text.
>
> Can someone recommend the best way to do this in xpathscript please ?

        If you mean how you can make XPathScript preserve whitespace characters 
within a <markup> or <code> tag, then I have good news: you don't have 
nothing to do. :-)  By default the parser used by XPS will leave the 
whitespaces as they are. Or it should (let me know if it doesn't). 


        Now, if you meant how you transform the text within <markup> or <code> 
to be 
printed verbatim and with a specific style, then this is entierely dependent 
upon what you are transforming your docbook into. If it's in html, then

        <% $template->set( 'markup' => { pre => '<code>', post => '</code>' } ) 
%>

will do the trick. If it's LaTeX, then you can do:

    <% 
        $template->set( 'markup' => { 
                                       pre => '\begin{verbatim}', 
                                       post => '\end{verbatim}' 
                                     } );
         $template->alias( 'markup' => 'code' ) 
    %>


Or, if you are using a pre-1.0 XPathscript:

        $t->{markup}{pre} = '<code>';
        $t->{markup}{post} = '</code>';

and

        $t->{markup}{pre} = '\begin{verbatim}';
        $t->{markup}{post} = '\end{verbatim}';
        $t->{code} = $t->{markup};


Cheers,
`/anick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to