Archive
Monthly
Go
|
|
DNN Blog
Dec
27
Posted by:
cathal connolly
12/27/2006 5:00 AM
Whilst the 4.4 release predominantly focussed on performance and optimisation, there were a number of other enhancements added to the release (as always the changelog is the best place to view changes). One of these, that should be of interest to skinners and those interested in accessibility standards & xhtml compliance, is support for skin level doctypes .
Historically, if you wanted to target your skin/container for a particular version of html/xhtml, you had to manually edit the default.aspx page to alter the hardcoded DOCTYPE declaration. With 4.4, the declaration has been made dynamic, to allow users to declare particular doctypes with particular skins. To make use of this, you create a file with the same name as your skin except ending in doctype.xml (rather than ascx/htm/html) and it’ll be picked up during skin load. This xml file should contain a single node,SkinDocType, that contains a declaration of your desired doctype. To ensure that the parser reads the value correctly, you need to use a CDATA section to escape out the various < and & characters e.g. If I have a skin called mypage.asx that I intended to render as XHTML 1.0 strict, then I would create a file called mypage.doctype.xml which would contain the following:
<SkinDocType><![CDATA[<!DOCTYPE XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">]]></SkinDocType>
18 comment(s) so far...
Re: using Skin-level DocType's
This must be an elegant solution. Keep up the god work! :) Thanks ArntK
By ArntK on
12/27/2006 11:37 PM
|
Re: using Skin-level DocType's
This is a good start to making DNN compliant to html/xhtml compliant. However, I'm still kind of disappointed that the core team didn't clean up the code to emit complaint code.
For example, I use the starter kit to set up a bare-bone DNN site with a myskin.doctype.xml present. When I try to validate the page on W3C, it still has all the errors from meta tags not being closed, top/left/right/bottommargin in the BODY tag.
How do we address this?
By linush on
12/29/2006 12:16 AM
|
Re: using Skin-level DocType's
And keep up the good work too! ;-)
Cheers!
Rob
By Rob Poretti on
12/29/2006 12:16 AM
|
Re: using Skin-level DocType's
our focus at this point is passing compliance legislation such as ADA-508/WCAG level 1, we'll continue to work towards this with the next few releases and probably then expand out to support xhtml compliance.
By cathal on
12/29/2006 12:24 AM
|
Re: using Skin-level DocType's
I've found about ten files in the DNN core can be edited just a wee bit in order to get xhtml compliance; so you'll need the source version of the download. The skin, container and module play a large roll in this too. Most of the edits are simple things like closing br tags and adding an attribute to a script tag. I'm hoping these types of edits make there way onto the backlog soon.
By andrewhay on
12/30/2006 1:47 AM
|
Re: using Skin-level DocType's
Hi Andrew,
Have you registered the files that need to be changed, along with the exact changes needed, into Gemini? Doing so would greatly increase the speed and likelihood of those changes being implemented.
- B
By BrandonHaynes on
1/2/2007 7:37 PM
|
Re: using Skin-level DocType's
How would you refer to this in an ascx skin. I rarely make the skins in html with tokens and xml file.
By pjpizza on
1/12/2007 9:27 PM
|
Re: using Skin-level DocType's
Sorry about that.... I misunderstood.... AGAIN! (Sometimes I wonder how I'm even able to stand up straight)
By pjpizza on
1/12/2007 9:28 PM
|
Re: using Skin-level DocType's
I am trying to get rid of nearly 200 warnings (using FF with HTML Validator extension for immediate validation result) on my dnn4.4 web site.
But shouldn't the correct DTD strings be either:
-or-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-or-
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
according to this recommendation: http://www.w3.org/TR/xhtml1/#docconf
Another puzzle: why is DNN changing the tags to ? The validation fails for every meta tag.
By njhvidberg on
2/1/2007 2:49 PM
|
Re: using Skin-level DocType's
ACK! The text is wrongly copy/pasted, here is the correct DTD's, without html code:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
By njhvidberg on
2/2/2007 8:44 PM
|
Re: using Skin-level DocType's
njhvidberg, you can set whatever DOCTYPE you like, that's the purpose of the SkinDocType node.
By cathal on
2/2/2007 8:47 PM
|
Re: using Skin-level DocType's
Hello Cathal,
I read with great glee your 12/27/2006 blog entry about the new ability to create a skinfilename.doctype.xml file to specify the doctype for a given page. I am doing this to get Ajax.NET working on a DNN site.
I set up my file(s) just as the article stated but the doctype is not changing. I then tried adding those doctype files to my skin.zip file, uninstalling the skin and re-uploading the skin.zip thinking maybe they are only read when the skin is uploaded.
Still, the doctype is remaining the same when I do "view source" in the browser after loading the page. I looked in the skins table and there is no sign there of anything related to doctype.
How can I debug this process? I named the files as stated - the prefix (before .doctype.xml) is the same prefix as the .ascx files (both full width and fixed with).
Inside it has:
]]>
It wrote the doctype file on the server just fine when I uploaded the new skin but there is no evidence that it is loading that new doctype and emitting it to the browser as expected.
Any help would be GREATLY appreciated as the alternative is to modify default.aspx directly which we really don't want to do.
Thanks!
By kkutz on
2/16/2007 6:40 PM
|
IGNORE LAST POST - Re: using Skin-level DocType's
You can cancel my last posting a few minutes back - I found the syntax error on the doctype.xml file.
Thanks!
By kkutz on
7/23/2007 9:39 PM
|
Re: using Skin-level DocType's
that don't works!! , xhtml not means change this line!!, dnn 4.4 dont close meta tags and not write correctly html tag, and input tags...
By jakial on
12/23/2007 1:24 AM
|
Re: using Skin-level DocType's
Hey all:
I tried to find this information in the skinning documentation, but this enhancement along w/a number of other skinning enhancements and changes haven't made it into the docs yet, I guess. Is there a central place to find out what the changes are and some kind of quick overview, or place to start looking? I haven't done a skin in about a year or so, and I noticed there are a number of changes made...thanks!
By andyah on
1/10/2008 8:08 PM
|
Re: using Skin-level DocType's
@andyah, theres no central place I'm afraid. The skinning code will be getting an update in the forthcoming release(s) so i expect the docs will be updated then. As for changes in skins, I thought this was the only recent one.
By cathal on
1/10/2008 8:09 PM
|
Re: using Skin-level DocType's
Just a link for French version of this problem :
Une explication en français pour ceux qui le désirent : www.muniere.fr/Blog/tabid/178/EntryId/14/ModalPopupExtender-ne-saffiche-pas-correctement-sous-DotNetNuke.aspx
By Nicolas MUNIERE on
3/11/2010 11:46 PM
|
Re: using Skin-level DocType's
Thanks Cathal, it worked perfectly for me. One minor thing, this comment submission form isn't accepting anything in website textbox(I used firefox 4).
By Ravi Gupta on
6/21/2011 3:25 PM
|
|