Re: issue-#113 XhtmlExporter bug with StdLinks.Target
Posted: Mon May 30, 2016 8:39 am
Here is a list of open issues. All of them are simple to fix.
1. According to the W3C validator any id (incl. an anchor id) should start with a letter in HTML 4.
So we have to prepend something like "id" or "anchor" or "StdLinks.Target" to the
ids generated for StdLinks.Target views.
2. The document title is currently unknown and a dummy title is hard-coded instead.
The english localization in Xhtml/Strings.odc results in a dummy page title of "New Page".
Instead of hard-coding a meaningless title we should remove the title at all.
Then any browser uses the file name as the page title.
As an example see the converted change list under http://blackboxframework.org/unstable/m ... anges.html, which is shown as "New Page".
3. The changes of XhtmlStdFileWriters.String/Char need to be reverted or improved.
Currently they can produce a TRAP if a string consists of too many 3 byte Unicode characters.
While such a case is hard to find it is also hard to prove that it cannot occur.
In addition and even more important, String does not need to allocate space by means of NEW but can work on the stack.
In contrast, the current version allocates a large number of small strings on the heap.
Actually for every single character in the BB document, an auxiliary string object is allocated!
Either leave the utf-8 conversion as it was (most efficient) or use Strings.StringToUtf8 per character
with a result string as a local variable VAR utf8Str: ARRAY 4 OF CHAR (i.e. on the stack).
This is still much more efficient than the current solution. As an optimization it would of course be possible
to call Strings.StringToUtf8 only if ch > 7FX.
4. The open issues listed under the issues fold in the header of the module XhtmlExporter need to be checked.
Open issues such as the missing extension mechanism should not be removed from this list.
- Josef
1. According to the W3C validator any id (incl. an anchor id) should start with a letter in HTML 4.
So we have to prepend something like "id" or "anchor" or "StdLinks.Target" to the
ids generated for StdLinks.Target views.
2. The document title is currently unknown and a dummy title is hard-coded instead.
The english localization in Xhtml/Strings.odc results in a dummy page title of "New Page".
Instead of hard-coding a meaningless title we should remove the title at all.
Then any browser uses the file name as the page title.
As an example see the converted change list under http://blackboxframework.org/unstable/m ... anges.html, which is shown as "New Page".
3. The changes of XhtmlStdFileWriters.String/Char need to be reverted or improved.
Currently they can produce a TRAP if a string consists of too many 3 byte Unicode characters.
While such a case is hard to find it is also hard to prove that it cannot occur.
In addition and even more important, String does not need to allocate space by means of NEW but can work on the stack.
In contrast, the current version allocates a large number of small strings on the heap.
Actually for every single character in the BB document, an auxiliary string object is allocated!
Either leave the utf-8 conversion as it was (most efficient) or use Strings.StringToUtf8 per character
with a result string as a local variable VAR utf8Str: ARRAY 4 OF CHAR (i.e. on the stack).
This is still much more efficient than the current solution. As an optimization it would of course be possible
to call Strings.StringToUtf8 only if ch > 7FX.
4. The open issues listed under the issues fold in the header of the module XhtmlExporter need to be checked.
Open issues such as the missing extension mechanism should not be removed from this list.
- Josef