List Info

Thread: formatting code/xml fragments?




formatting code/xml fragments?
user name
2006-09-21 12:35:42
I've tried to search for information on this, but the
search terms  
have too much overlap with the underlying technology to
tease out  
what I'm looking for.

Which is... Has anyone customized the stylesheets in order
to format  
source code for display in HTML or PDF?  I'm interested in
something  
that produces a color-coded output for XML source.  I'm
currently  
using XInclude to draw in an entire source XML file as
follows:

     <programlisting>
       <xi:include xmlnsi=&q
uot;http://www.w3.org/200
1/XInclude"  
href="../../schema/layout.xml"
parse="text">
         <xi:fallback>document not
found!</xi:fallback>
       </xi:include>
     </programlisting>

This has three deficiencies:

1) In PDF output long lines are truncated on the right side
2) Because it is parsed as text it isn't possible to use
XPointer to  
grab a section of the source document
3) The result is plain black on white, which isn't as
readable as if  
it were formatted

I realize I'm addressing a lot of issues in one message,
but have  
others devised ways to handle this already?

Duane Gran

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

formatting code/xml fragments?
user name
2006-09-21 15:20:05
Duane Gran wrote:

> This has three deficiencies:
> 
> 1) In PDF output long lines are truncated on the right
side

http://docbook.sourceforge.net/
release/xsl/current/doc/fo/hyphenate.verbatim.html

> 2) Because it is parsed as text it isn't possible to
use XPointer to 
> grab a section of the source document

I think that someone recently provided custom XPointer
scheme for doing 
this. Try searching archives.

> 3) The result is plain black on white, which isn't as
readable as if it 
> were formatted

The latest stylesheets can do this. See:

http://xmlguru.cz/2006/07/docbook-syntax-highlighting

-- 
------------------------------------------------------------
------
   Jirka Kosek     e-mail: jirkakosek.cz     http://www.kosek.cz
------------------------------------------------------------
------
   Profesionální školení a poradenství v oblasti technologií
XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/

------------------------------------------------------------
------
                    Nejbližší termíny školení:
     ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006
**
      ** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
------------------------------------------------------------
------
   http://xmlguru.cz    Blog
mostly about XML for English readers
------------------------------------------------------------
------

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )