OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK: Re: external programlistings


At 8:26 AM +0200 3/28/00, Karl EICHWALDER wrote:
>Please, try:
>
><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
><!ENTITY tips SYSTEM "tips.sgml">
>]>
>
>...
><programlisting><![ RCDATA [&tips;
>]]>
></programlisting>
>
>You're looking for RCDATA (Replacable Character Data).  I hope, XML
>didn't drop this feature.

Youch!  RCDATA is not part of the XML spec.  (Sorry, I realize that 
my first message failed to specify that I was using the XML version 
of DocBook, not SGML.)

Looks like the closest thing available to me in XML is an unparsed 
external entity.  However, the XML spec says that unparsed entities 
may only be referred to in attribute values declared to be of type 
ENTITY or ENTITIES.  This means that I would need to have some direct 
support from the DocBook DTD for embedding external source code in a 
<programlisting> element.  The <programlisting> element does not seem 
to have any attributes of type ENTITY.

It would be nice to have something like:

<programlisting src="Tutorial1.java"/>

Then it would be up to the stylesheet to interpret the (possibly 
relative) URL, and figure out what to do with it.

If I remember correctly, however, having an XSL stylesheet include 
the contents of another document inside the result tree is not a 
standard feature of XSL (it may be supported by XT).  If the 
stylesheet did include the external document, it would need to escape 
it into well-formed XML on the way in.

-- 
+-------------------------------------------------------------------+
| Dave Makower                                 <davemak@iclick.com> |
| Manager of Portal Architecture & Development                      |
+--------------------------------+----------------------------------+
|   iClick, Inc.                 |   (914) 872-8030                 |
|   120 Bloomingdale Road        |   (914) 872-8100   fax           |
|   3rd Floor                    |   (914) 872-8000   main          |
|   White Plains, NY  10605      |   http://www.iclick.com/         |
+--------------------------------+----------------------------------+



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC