[Cuis-dev] EruditeXMLBook example

Mariano Montone marianomontone at gmail.com
Sun Mar 16 05:47:58 PDT 2025


Hannes,

El 14/3/25 a las 20:12, H. Hirzel escribió:
>
> As it is about extending HTML in a way that  Smalltalk features may be 
> loaded and executable code may be marked, I think it needs some 
> discussion what the options are and how this should be done in particular.
>
> Using (X)HTML makes use of an standard which has been around for a 
> long time and people know. This is a huge benefit, this should give a 
> reason for acceptance of the approach.  It should result in a small 
> additional learning effort for the Erudite/Smalltalk oriented 
> features. It is also good for generated XML content files. Compared to 
> this DOCBook is not well-known and as you noted can not be easily 
> extended. XHTML can also benefit from conversion programs like pandoc 
> (with some post-editing afterwards) and thus get content from various 
> sources.
>
While XHTML has its advantages, not that I'm not deciding to use it by 
default, or not yet at least. Notice that I'm importing it as feature. 
The same could be done we wanted to write XML books using DocBook 
elements. Require an EruditeXMLBookDocBook extension, and then use . 
DocBook has some tags not available in XHTML that are interesting to 
consider, like programlisting, xref, etc.
>
> Regarding your XML code example in particular:
>
> I would drop the request that each section needs to be in a separate 
> file as it is the case with the 'book.xml' in DocBook. So it should 
> also be possible to create a Erudite book from one XHTML file.
>
Ok. Ideally this should be optional, either one file or multiple.
>
> As an Erudite book is composed of sections I would not use a <chapter> 
> tag but <section> instead. This is a tag in the XHTML standard. 
> Sections may also be nested thus giving an easy way to specify 
> subsections which Erudite supports. I am not aware if nesting sections 
> works for DocBook. So the test example should include more than one 
> section.
>
> Going for known tags also applies for <title> tag, I suggest just to 
> use <h1> for the whole book <h2>, <h3>... within the sections.
>
> I have seen that EruditeDoc nodes also have a data property. But I 
> have not observed yet where they are used. Could the data attribute 
> (containing sometimes a dictionary object) be used for attributes of 
> XHTML tags? The YAXO XML reader supports attributes.
>
The data property is used in "special" elements, like images, that need 
to store the image data. For attributes we can simply use class slots.
>
> As for the Smalltalk code representation I want to conduct some tests 
> with EruditeXMLBook and give a more detailed comment later.
>
Ok. I'm not sure the current implementation is best. I'm finding some 
extensibility problems with Smalltalk.

       Mariano



More information about the Cuis-dev mailing list