Subsystem Xml available on CPC

Announces, releases and PayPal balance.
Post Reply
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Subsystem Xml available on CPC

Post by Josef Templ »

I would like to announce the availability of a new subsystem called Xml on CPC.
See http://www.zinnamturm.eu/downloadsTZ.htm#Xml.

This subsystem provides XML, HTML, and CSS parsers (and scanners) and it provides
an HTML importer that can import 'HTML Format' clipboard data.

Since RTF (rich text format) seems to be no longer supported by major browsers (was it ever supported?),
this subsystem could be used for transferring formatted HTML data from the clipboard to BlackBox.

Technically, the HTML importer uses the HTML parser for translating the clipboard HTML data into a DOM structure in memory.
Then, the HTML importer converts DOM to formatted BlackBox text, as good as possible. Of course, not all
HTML constructs can be converted perfectly. Whenever the importer sees a so-called inline style attribute,
it uses the CSS parser to parse the style attribute. Known CSS style properties are then converted to the appropriate
text attributes and ruler settings. Importing is reasonably fast, about 10 times faster than in MS Word 2013.

In order to avoid excessive string object creation (on the heap) the HTML importer uses string pooling
for both the HTMl and the CSS parsers.
String pooling means that strings that occur multiple times are represented by a single shared object.
It is an optional feature of all included parsers.

- Josef
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Subsystem W3c available on CPC

Post by Josef Templ »

The subsystem Xml now also provides JSON support
and it has been renamed from Xml to W3c.

Dowbload from http://www.zinnamturm.eu/downloadsTZ.htm#W3c.


- Josef
luowy
Posts: 87
Joined: Thu Dec 17, 2015 1:32 pm

Re: Subsystem Xml available on CPC

Post by luowy »

Hi Josef,
I found a problem: It traps when pasting a html fragment ;
you can copy and paste the following html to reproduce this bug:

https://www.zinnamturm.eu <=> https://www.zinnamturm.eu


luowy
luowy
Posts: 87
Joined: Thu Dec 17, 2015 1:32 pm

Re: Subsystem Xml available on CPC

Post by luowy »

It has been solved.
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Subsystem Xml available on CPC

Post by Josef Templ »

I just noticed that the formatting of the imported page (https://www.zinnamturm.eu) could be improved a bit.
In the header section it has a list of buttons, which currently appear one button per line in BlackBox.
The reason is that the HtmlImporter does not look at the 'display' property when
converting list items (<li>). In this case the display property is 'inline', whereas the importer
assumes the default 'block', which means one per line.
In a future version it will be fixed, probably together with further formatting improvements.

- Josef
Post Reply