Page 3 of 9

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

Posted: Wed May 18, 2016 8:11 pm
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.

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

Posted: Thu May 19, 2016 7:56 am
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

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

Posted: Thu May 19, 2016 8:37 am
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

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

Posted: Thu May 19, 2016 10:55 am
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

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

Posted: Thu May 19, 2016 2:12 pm
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>

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

Posted: Thu May 19, 2016 4:39 pm
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

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

Posted: Fri May 20, 2016 9:41 am
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

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

Posted: Fri May 20, 2016 10:42 am
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

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

Posted: Fri May 20, 2016 11:18 am
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

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

Posted: Fri May 20, 2016 12:57 pm
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.