issue-#113 XhtmlExporter bug with StdLinks.Target

Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Ivan Denisov »

I tuned Xhtml exporter to use CSS.
http://blackboxframework.org/unstable/i ... b1.528.zip
Also link now can be in the line.
User avatar
Josef Templ
Posts: 2048
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Josef Templ »

StdLinks.Target produces a TRAP because of an ASSERT in Anchor.
ASSERT(~e.inTable, 21); ASSERT(~e.inPara, 22);

I think that both asserts should be removed.

- Josef
User avatar
Josef Templ
Posts: 2048
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Josef Templ »

Is it possible to preserve empty lines somehow?
Currently (also in BB1.6) they are converted into an
empty paragraph <p/>, which is ignored during rendering.

Wouldn't <br /> be an option? I think it is allowed in xhtml.

With empty lines the change list would look quite well when
converted with the new version.

- Josef
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Zinn »

Ivan, a few note about your solution:

1. The Doctype declaration in the current XHTML subsystem is wrong. One correct possibility is
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
see Recommended list of Doctype declarations https://www.w3.org/QA/2002/04/valid-dtd-list.html

2. To creating <p/> is not allowed. it must be <p></p>.
<br /> is allowed in xhtml.

3. You can check the created XHTML text on the website http://validator.w3.org/

4. See https://www.w3.org/TR/xhtml-basic/ for valid tags and https://www.w3.org/TR/REC-CSS1/ for formatting options.

-Helmut
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Ivan Denisov »

Fixed
http://blackboxframework.org/unstable/i ... b1.529.zip

Now headers are passing validation test (not all tags yet), anchors exported well, empty lines rendered as <p>&nbsp;</p>
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Ivan Denisov »

Fix the problem with span order with links.
Also replaced <U> to text-decoration. Also add text-aligment for <p>.
http://blackboxframework.org/unstable/i ... b1.531.zip
User avatar
Josef Templ
Posts: 2048
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Josef Templ »

Is there a reason (except for history) why TextModels.line is handled like a paragraph?

I think it should be handled separately and converted into a line break:

Code: Select all

			ELSIF ch = TextModels.line THEN
				e.wr.StartTag("br", XhtmlWriters.preserve); e.wr.EndTag();
				e.tabIndex := -1	(* no tab read in this line yet *)
This is the natural mapping as far as I understand it.
I don't know the interaction with Tabs. Has this also been looked at?

Have text rulers been tested with the new version?

- Josef
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Ivan Denisov »

Yes, I checked exporter with several text rulers and tabs. Tabs exported as table only if special marker views in the text.
Xhtml.png
Agree about new line. I fixed this. Also I added support for first line indentation.
http://blackboxframework.org/unstable/i ... b1.534.zip
User avatar
Josef Templ
Posts: 2048
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Josef Templ »

Ivan Denisov wrote:Yes, I checked exporter with several text rulers and tabs. Tabs exported as table only if special marker views in the text.
Xhtml.png
Agree about new line. I fixed this. Also I added support for first line indentation.
http://blackboxframework.org/unstable/i ... b1.534.zip
Looks good now in principle.

There is one little improvement for the <br/> change:
In addition to outputting <br/>, e.wr.Ln should be called
like it is done in EndPara. This makes the generated html better readable
when opened with a text editor because it breaks huge lines into smaller ones.

- Josef
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#113 XhtmlExporter bug with StdLinks.Target

Post by Ivan Denisov »

Agree, I will change this a bit later.

Can some native speaker to check the documentation?
Now there are no font, strong, em tags. We should somehow fix the docu.
Post Reply