[Cuis-dev] EruditeXMLBook example

Mariano Montone marianomontone at gmail.com
Thu Mar 13 15:45:58 PDT 2025


Hi Hannes, folks,

El 12/3/25 a las 12:00, H. Hirzel escribió:
> On 11/03/2025 3:28 pm, Mariano Montone via Cuis-dev wrote:
>
>> Btw, last time I looked at DocBook, I didn't find it extensible the 
>> way I would have liked.
>>
>> In my opinion, we should have an XML standard that is easily 
>> extensible, and that completely separates semantic elements from its 
>> rendering.
>>
>> That would make it possible to manipulate documents and extract 
>> information from them in a powerful way, without losing information. 
>> And also render the documents for different mediums in a correct way.
>>
>> I don't understand why there's not something like that. I don't think 
>> DocBook is that, but it should have been.
> Could you please elaborate on this? For my purposes it seems to be 
> good enough. Or do you specifically mean the handling of the embedded 
> code expressions?
>>
>> That's what XMLEruditeBook is about. 

I've added an example of XML books.

To try, evaluate:

Feature require: 'EruditeXMLBook'.

(EruditeXMLBook new
     file: (CodePackage installedPackages at: 'EruditeXMLBook') fullFileName asFileEntry parent // 'Examples/xmlbook2.xml')
     open.

This is the demo book:

<book>
   <requirements>
     <feature>EruditeXMLBookHTML</feature>
     <feature>EruditeXMLBookSmalltalk</feature>
   </requirements>
   <chapter>
     <title>Intro</title>
     <p>Hello world</p>
     <p>
       <ul>
         <li>Hello</li>
         <li>World</li>
       </ul>
     </p>
     <p>
       <smalltalk>
         Object new
       </smalltalk>
     </p>
     <p>
       <doit>
         Smalltalk inspect
       </doit>
     </p>
   </chapter>
</book>

Notice how the book specifies the features it needs for parsing and 
rendering, and they are loaded when the book is opened.

XML makes the syntax automatically extensible, and references to the 
requirements loads the parsers and renderers needed for a book.

There's no book that can't be authored with a system like this! :)

This is Erudite endgame :P

       Mariano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250313/bb6c23a5/attachment.htm>


More information about the Cuis-dev mailing list