Changing Document Type

New to web-building ? Simple answers to "How do I . . .?"

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

Changing Document Type

Postby wacole1213 on Mon Jan 30, 2017 3:18 pm

Hello,

This is my first pass at using BlueGriffon. My first skill is not web development, but FileMaker programming. I could be making a hash of all of the following.

I have a number of HTML files for a help system that were prepared with LibreOffice 5.x under Windows 10. The document line on these files is:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

I have opened several of them in BlueGriffon, made some minor changes and then saved. It did not cross my mind - until now - that the default document type for BlueGriffon is HTML5 and so I had made changes to those documents in HTML5 but saved those to an HTML4 Transitional [whatever that means] document. All of this started because even though the documents preview just fine in BlueGriffon, they do not display [missing borders, mostly] properly when used with the web rendering engine [FileMaker 13 WebViewer - which uses IE] built into my application development environment. I don't know - though I suspect it doesn't - if the WebViewer rendering engine handles HTML5.

A couple of questions which I did not find answers to in the manual [I did buy a license]:

1. Is it possible to change the default document type in BlueGriffon [temporarily] to HTML4?
2. I do have backups of my HTML4 help files. If I restore them, how do I bring them into BlueGriffon and save them as HTML4 rather than HTML5?

Thanks very much,
Bill Cole
Fredericksburg, VA USA
wacole1213
 
Posts: 2
Joined: Wed Jan 25, 2017 2:33 pm
Country: United States (us)

Re: Changing Document Type

Postby dr-john on Thu Feb 02, 2017 9:31 am

What's a doc type? A set of rules that says how to interpret the code in the html file, what code tags are allowed, and how they should be displayed. So if you tell the browser it's html 4 and write html 5 bits, the browser ignores the html 5 bits.


This article say filemaker 13 CAN work with html5
http://www.macworld.com/article/2065606/filemaker-13-the-database-is-in-your-browser.html

this article suggests the same thing
http://isolutions-inc.com/2013/07/06/what-is-html5-and-why-should-filemaker-developers-care-spoiler-alert-they-should/

Same here
http://forums.appleinsider.com/discussion/161018/filemaker-13-launches-with-browser-based-support-via-html5-new-tools-for-iphone-ipad

They also say filemaker supports desktop browsers, so why use a built in browser?

If the saved file still has doc type html 4 transitiona but html5 bits in itl, that is likely to be the source of the problem, as the webviewer may be trying to use the features available in that antique version of html, and therefore ignore the html5 bits.

I'd suggest making a test project where you write the help files in blue griffin, in html 5, and then test how it looks in your application. You don't need many web design skills, apart from learning that syling things inline is wrong, and styles should be in a css file. I'd suspect that for your help files, you styling needs are very simple and thus you could learn the little you'd need in a short time.

However using a word processor to create an html file is always a very bad way to work - would you use a brick as your tool of choice to hammer in nails, or a knife as your tool of choice to unscrew a screw, and a hammer to drive in the screw???

Having just downloaded LibreOffice yesterday to my new laptop, I opened a word doc in it and saved it as html, then looked at the source code. Yes it saves as html 4.0 transitional , a file format proposed in 1997 to help those who used html 3.2 (1996) and earlier formats get used to html 4 without all they old documents crashing and burning.

I was a bit shocked at it using such an old tranistional format, but then word processors are not designed for html, and using the old format enables them to swap back to word processing docs when you open the file again.

If you discover somewhere that you have the option to use XHTML, DON'T, it was a dead end format that never went anywhere, its stricter rules caused many people problems and it just faded away to oblivian eventually.
dr-john
 
Posts: 609
Joined: Wed May 13, 2009 1:37 pm
Location: Kent
Country: Scotland (sp)

Re: Changing Document Type

Postby dr-john on Thu Feb 02, 2017 9:35 am

A possible solution to your problem is to open all your help files in libreoffice, copy the text to a plain simple text editor, which usually throws away all the formatting info. Then copy the plain text into blue griffin, and format the text in that, and save as html5

Obviously you'd try this in a test project first, but the single most obvious thing to do is NOT use a word processor to prepare an html file, given that this is the road to disaster, whatever use you intend to make of the html file.
dr-john
 
Posts: 609
Joined: Wed May 13, 2009 1:37 pm
Location: Kent
Country: Scotland (sp)

Re: Changing Document Type

Postby gregtutor on Thu Feb 02, 2017 10:06 am

wacole1213 wrote:This is my first pass at using BlueGriffon. My first skill is not web development, but FileMaker programming.
I have no skills or knowledge of Filemaker - beyond just taking a quick look at its web site.
I have a number of HTML files for a help system that were prepared with LibreOffice 5.x under Windows 10. The document line on these files is:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
I think that is where your problem lies. Neither BlueGriffon (nor even KompoZer) can handle HTML4.0. The oldest DOCTYPE they recognise is HTML4.01.

I have just tried, for the first time, saving a file as HTML within LibreOffice5 and was shocked to discover that there are no DOCTYPE options offered and any page gets saved automatically with the DOCTYPE you quote.
It did not cross my mind - until now - that the default document type for BlueGriffon is HTML5 and so I had made changes to those documents in HTML5 but saved those to an HTML4 Transitional [whatever that means] document.
"Transitional" (aka "Loose") means when checking for conformance with W3C standards a more lax approach is taken and some code that would meet the older HTML3.2 standard would be accepted.
All of this started because even though the documents preview just fine in BlueGriffon, they do not display [missing borders, mostly] properly when used with the web rendering engine [FileMaker 13 WebViewer - which uses IE] built into my application development environment. I don't know - though I suspect it doesn't - if the WebViewer rendering engine handles HTML5.
Almost certainly BlueGriffon is using CSS3 code to apply the borders and this isn't recognised by WebViewer.

I note that Filemaker is now up to v15 and I failed to find out how old v13 might be. I'm also curious about your reference to IE as Windows10 has Edge as its browser (or so I thought. I run Linux Mint and am a little out of touch with Windows.)
A couple of questions which I did not find answers to in the manual [I did buy a license]:

1. Is it possible to change the default document type in BlueGriffon [temporarily] to HTML4?
There's no facility change the DOCTYPE of a file once loaded. The best you can do is create a new document with the desired DOCTYPE and paste in the content.

However, I am not getting the same results as you. Having saved my LO HTML file (with the DOCTYPE you quote) I loaded it into my copy of BlueGriffon (v1.7.2) and then re-saved it. (I had to do a "Save as" as "Save" was greyed out) and the only difference in the resulting file was that it prompted me for a page title, which it inserted in the tags already present and output a file with a deeper level of indentation in the code. There is no option to change the DOCTYPE when doing as "Save as".

It's also worth noting that if you change the default DOCTYPE for BlueGriffon and choose HTML4 then you get HTML4.01. It offers "Transitional" by default, which is not going to break code written to HTML4.0.

I guess it is possible that BlueGriffon2 is performing differently. I ran it very briefly, but my licence code failed to take effect and as I hated the dark theme and the light theme option wasn't properly implemented so I returned to the latest version in the Linux repository, rather than attempting to run v1.8 that I was used to under Windows.
2. I do have backups of my HTML4 help files. If I restore them, how do I bring them into BlueGriffon and save them as HTML4 rather than HTML5?
I suppose you could test an earlier version of BlueGriffon to see if you get the same results as I do. They are available at:
http://bluegriffon.org/freshmeat/
Be advised, they work on a slightly different shareware principle. The basic program is freeware and you buy add-ons and these will no longer be available as the main site has changed to allow for the V2 system. In my experience very few, if any, of the old add-ons are necessary for most users, merely handy. As a coder, I found some, particularly the CSS Pro Editor, cumbersome in the extreme and abandoned them.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3746
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Changing Document Type

Postby wacole1213 on Sun Feb 05, 2017 7:26 pm

Thank you all for your thoughtful and useful replies. Particular thanks to Greg for taking the time for such a detailed response. Very impressed with the knowledge of the folks on the forum. Now to see if I can get all this work. Be well. Bill Cole
wacole1213
 
Posts: 2
Joined: Wed Jan 25, 2017 2:33 pm
Country: United States (us)


Return to Beginner Q & A


Who is online

Users browsing this forum: Google [Bot] and 0 guests