Reading 2012.1 doc--how to get an html5 page

48 views
Skip to first unread message

Dawn Wolthuis

unread,
Feb 15, 2012, 4:49:43 PM2/15/12
to InterSystems: Zen Community
Yikes. I just agreed to do a talk on the html5boilerplate and Zen at a
little conference, right before I found out I had a show-stopper in
2010.2.1, so I'm in a bit of a bind as I was planning to show off what
we have at that point. I have just been told a bug will not be fixed
in 2010.2.1 and that I should upgrade to 2012.1, so I am looking for
2012.1 doc related to the html5 doctype at the top of the pages. I did
not find anything by searching the doc that was downloaded with the
trial version of 2012.1, but I found this in the release notes on the
web:

"Whether HTML5 output is produced or not is controlled by the setting
of a global, ^%ISC.ZEN.cssLevel. If the value of this global is set to
3, all Zen pages written by InterSystems that are served to browsers
that support it will produce HTML5 output (interpreted in strict
rather than quirks mode). If the global is missing or has the value 2,
HTML output will be the same as in 2011.1. The default for new
installations and upgrades is to retain the previous behavior."

I want to be sure that I can generate pages with an html5 doctype for
any pages we choose, just like any other web developer might do, and
use the html5boilerplate features we are using in 2010.2.1 for
handling older browsers.

In 2010.2.1 we get out of quirks mode with

Parameter HTMLDTD = 1;

We were hoping for a new parameter or a changed value for this
parameter in order to generate html5 pages with Zen, but I see no
documentation that indicates this is the case. Given that every
browser out there supports the html5 doctype at the top of the page,
with easier-to-design pages than the no doctype quirks mode than we
have been using, I am not sure what it means that there would be a
browser that does not support the html5 doctype but does support
having no doctype. I have tested html5 doctypes in IE 6, 7, 8, 9 as
well as various versions of FF, Chrome, Safari, Opera, etc. but I am
still working on design, so there might be some issues left to
discover. So, I am guessing that I am not understanding this paragraph
in the release notes.

What is the magic to getting the html5 doctype to generate at the top
of each Zen page? The release notes indicate some sort of global (we
rarely use this word on our team as we work with MV files) that needs
a new value. We definitely do not want to change this behavior
globally. Can we set that value for a page through the SMP or do we
need to get to the COS prompt and fiddle around (something we NEVER do
unless explicitly told there is no other way)? I'm hopeful the page
itself and not the config of the system will be able to specify the
doctype to be used, but I have not yet figured out what goes into a
page when we want the doctype to be the current industry standard
(html 5 doctype). We definitely do not want a system-wide parameter as
we have some namespaces that should currently generate quirks mode
pages until we are ready to switch them over and others where we would
want to start by testing out some pages.

So, how do we get the html 5 doctype on the top of the pages we are
testing in html5? We do not want a different doctype in the case of
different browsers (who does that?!), so I'm hoping that I am simply
not understanding. If it is not possible to generate html5 pages still
in 2012.1, I need to sink into my seat, I mean, I need to figure out
how to get out of the talk I was going to do and also figure out how
to get our application working, given the show-stopper in 2010.2.1,
convert our html5boilerplate features from 2010.2.1 to 2012.1 and
ensure that our pages work. I am not finding the right doc by
searching for html5 or doctype within the documentation delivered with
the 2012.1 download. Thanks in advance for any tips. --dawn
--
Dawn M. Wolthuis

Take and give some delight today

Dale du Preez

unread,
Feb 15, 2012, 4:56:30 PM2/15/12
to intersys...@googlegroups.com
Hi Dawn,

To specify HTML5 for a Zen page, you need to override the
%OnDetermineCSSLevel() method for the page and return 3. (I believe the
method returns "" or 2 by default.) If you have a base page (or a set of
base pages), it should be fairly easy to implement this change in a
superclass.

We needed to do this for a number of pages in the Ensemble portal where
we use SVG graphics -- HTML5 allows us to use the browsers' native SVG
engines without worrying too much about which browser we are dealing with.

I hope that helps,
Dale

Dawn Wolthuis

unread,
Feb 15, 2012, 4:57:21 PM2/15/12
to InterSystems: Zen Community
I see that I missed part of the quote from the release doc that I
found on the web (that does not appear in the delivered doc)

Those applications that wish more fine-grained control over HTML5
production can override the method,
%OnDetermineCSSLevel() for a page or subclass to return the value 3.
Certain pages in the management portals work
in this mode already; and all will beginning in 2012.2.

OK, so that answers the question of how to get it into a single page,
but does not clarify that the doctype will be html5 independent of the
user's browser. --dawn

Bill McCormick

unread,
Feb 15, 2012, 4:58:41 PM2/15/12
to <intersystems-zen@googlegroups.com>, InterSystems: Zen Community
All browsers we have tested work fine with that setting based on the supported browsers guide in the docs

Bill

> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>

Dawn Wolthuis

unread,
Feb 15, 2012, 4:58:44 PM2/15/12
to intersys...@googlegroups.com
Thanks Dale, I saw that I had missed part of the info after I clicked send.

OK, so the page never changes from the html5 doctype into quirks mode
or some other doctype, right? --dawn

> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to
> InterSystems-Z...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:
> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions

--

Roberto

unread,
Feb 15, 2012, 4:59:04 PM2/15/12
to InterSystems: Zen Community
If you look at the code for abstractPage.cls, this should work for
you:

Parameter HTMLDTD = 0;

Method %OnDetermineCSSLevel() As %Integer
{
Quit 3
}

-Roberto



On Feb 15, 4:56 pm, Dale du Preez <dale.dupr...@intersystems.com>
wrote:

Dawn Wolthuis

unread,
Feb 15, 2012, 5:00:25 PM2/15/12
to intersys...@googlegroups.com
I am trying to make sure I can still integrate the html5boilerplate
features we are using. It was not clear to me that the html5 doctype
stays on the pages. I don't use SVG at all, but I do need the html5
doctype. Thanks. --dawn

Dawn Wolthuis

unread,
Feb 15, 2012, 5:12:41 PM2/15/12
to intersys...@googlegroups.com
Yes, we had never changed delivered Cache' code until we changed
2010.2.1 to generate the html5 doctype, instead of html4, with HTMLDTD
= 1 and while we were at it, we put in this into the abstractPage
If (+..#HTMLDTD) {
&html<<meta charset="utf-8" />>
&html<<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />>
}

so hopefully in 2012.1 the generated zen pages will put these right up
top or permit us to specify this. It took our little team of
sweat-equity partners with day jobs who are working very few hours per
week more than a year to get 2010.2.1 to the point where we are now
working on getting out of quirks mode before our next alpha tests.
That's when we hit a show-stopper delivered to everyone in 2010.2.1
but apparently something that only affects us(?). It is this:

All pages that have HTMLDTD = 1 (pages that are out of quirks mode)
have the location for modal group pop-ups calculated wrong when the
user scrolls down before clicking something like a calendar pop-up or
combobox or so. If anyone has a work-around/fix for this bug, then we
might have a chance of going live out of quirks mode with 2010.2.1
instead of spending 2012 mired in upgrades again rather than working
on the app. Thanks in advance for any and all suggestions. --dawn

> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions

--

Derek Day

unread,
Feb 15, 2012, 10:15:33 PM2/15/12
to intersys...@googlegroups.com
There are several fixes for these. Essentially the issue is that in quirks mode the browser supplies px as the default unit for JavaScript modified CSS position properties, but in standards mode, the units must be explicitly provided.

You should contact the WRC and request the rest of the fixes -- if you have them all, you may want to request a full kit patch, or ask for clarification of how to install the patch. If I remember correctly, super classes were impacted, and its possible that compiling the related subclasses results in several updates to the generated files.

HTH
Derek

>> > installations and upgrades is to retain the previous behavior.."

Dawn Wolthuis

unread,
Feb 15, 2012, 10:38:46 PM2/15/12
to intersys...@googlegroups.com
OK, I sent that to the WRC. I have one ad hoc, then loaded a second
that had issues that were duplicated. I'll see if there is a new ad
hoc that might do the trick. This is VERY encouraging! Thanks. --dawn
Reply all
Reply to author
Forward
0 new messages