Forums / Extensions / ezoe ezxml header-tag vs. html-header-tag level

ezoe ezxml header-tag vs. html-header-tag level

Author Message

Christian Rößler

Wednesday 25 August 2010 11:34:11 am

Hy,

just fell across the following issue and would like to know the technical reasons for this design decision:

http://share.ez.no/articles/ez-publish/how-to-skin-an-ez-publish-now-site/(page)/9

"h1 in XML in the Online Editor is equivalent to h2 in XHTML; h2 in XML in the Online Editor is equivalent to h3 and so on."

I know it's not a bug, it is a feature. But I would like to know WHY (technically speaking) a ezxml header-tag level 2 is translated to an (x)html header tag level 3.

Thank you.
Chris

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

Christian Rößler

Wednesday 25 August 2010 11:40:39 am

oopsy, tried the search function which gave me the following result:

http://share.ez.no/forums/developer/contributed_documentation_problem/(from)/ez.no/

So it's a xhtml standard, thus i cannot 'skip' header levels and must maintain the order h1, then h2 after that h3 and so on. I cannot start with h3 in my document.

m(

thanks
chris

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

*- pike

Wednesday 25 August 2010 3:44:38 pm

I think the standard is the h1 is more *important* than h2, but not necessarily the first .. or ..

http://www.w3.org/TR/xhtml2/mod-structural.html#sec_8.5.

doh .. "The practice of skipping header levels is considered to be bad practice. The series h1 h2 h1 is acceptable, while h1 h3 h1 is not, since the heading level h2 has been skipped."

...that still doesnt explain why <header level="1"> becomes <h2>. very confusing indeed. I think in most designs h1 would be reserved for the title of the page .. so the content of the xmlblock should indeed often be lower. still, if that was the choice, they should have limited it to 5 headers by default. you can change all that ofcourse.

*-pike

---------------
The class eZContentObjectTreeNode does.

Christian Rößler

Thursday 26 August 2010 12:44:02 am

Thanks for your input and comments pike.
Your link to w3c.org helps me to understand this issue (and thinking) more.

Nevertheless, it still does'nt explain the whole translation process. I'll dig through some ini-files and/or ezoe-classes to find a nice way to alter this behaviour to our (clients) needs.

Thanks again.

Chris.

Ps: i like your signature: "The class eZContentObjectTreeNode does." ;-) Always makes me smile when i see this in ez kernel classes.

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

André R.

Thursday 26 August 2010 3:19:29 pm

you can opt out of the h1 becomes h2 stuff by overriding header.tpl, original is in:

http://github.com/ezsystems/ezpublish/tree/master/design/standard/templates/content/datatype/view/ezxmltags/

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Christian Rößler

Friday 27 August 2010 12:23:45 am

yep, found it already.
thanks andré.

btw: git/github rocks. subscribed to its rss feed to get the bleeding edge commits...
great decision for the switch to git.

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

André R.

Saturday 28 August 2010 3:56:14 pm

> btw: git/github rocks

Oh yes! In the prosess of creating a git guid for getting source and contributing easily with Github GIt style. So much easier to do for reviews, testing & sharing new stuff, and suggest changes..

fork -> change -> push topic branch -> request pull

(iterate change and push until you / ez / others are happy with the change using online review and diffs)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 17 2025 23:35:47
Script start
Timing: Jan 17 2025 23:35:47
Module start 'content'
Timing: Jan 17 2025 23:35:48
Module end 'content'
Timing: Jan 17 2025 23:35:48
Script end

Main resources:

Total runtime0.5899 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.8438180.8125
Module start 'content' 0.00720.4630 768.6563634.1719
Module end 'content' 0.47020.1196 1,402.8281341.0547
Script end 0.5898  1,743.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.6685210.0002
Check MTime0.00140.2341210.0001
Mysql Total
Database connection0.00070.123610.0007
Mysqli_queries0.502485.17572110.0024
Looping result0.00210.35562090.0000
Template Total0.561795.220.2809
Template load0.00190.323620.0010
Template processing0.559894.896520.2799
Template load and register function0.00020.035810.0002
states
state_id_array0.00080.130010.0008
state_identifier_array0.00060.104420.0003
Override
Cache load0.00170.2891530.0000
Sytem overhead
Fetch class attribute can translate value0.00200.347040.0005
Fetch class attribute name0.00100.166380.0001
XML
Image XML parsing0.00150.250140.0004
class_abstraction
Instantiating content class attribute0.00000.002690.0000
General
dbfile0.00470.8005280.0002
String conversion0.00000.001430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
2content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs