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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:07:43
Script start
Timing: Jan 18 2025 02:07:43
Module start 'layout'
Timing: Jan 18 2025 02:07:43
Module start 'content'
Timing: Jan 18 2025 02:07:44
Module end 'content'
Timing: Jan 18 2025 02:07:44
Script end

Main resources:

Total runtime0.5170 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.4297153.4688
Module start 'layout' 0.00550.0028 742.898439.4219
Module start 'content' 0.00830.5074 782.3203629.4844
Module end 'content' 0.51570.0013 1,411.804720.1250
Script end 0.5170  1,431.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.5746160.0002
Check MTime0.00130.2461160.0001
Mysql Total
Database connection0.00060.112710.0006
Mysqli_queries0.456488.2748740.0062
Looping result0.00060.1162720.0000
Template Total0.491795.120.2458
Template load0.00190.359020.0009
Template processing0.489894.736920.2449
Template load and register function0.00010.024410.0001
states
state_id_array0.00080.145810.0008
state_identifier_array0.00070.141920.0004
Override
Cache load0.00160.3164530.0000
Sytem overhead
Fetch class attribute can translate value0.00070.129930.0002
Fetch class attribute name0.00090.175580.0001
XML
Image XML parsing0.00080.146230.0003
class_abstraction
Instantiating content class attribute0.00000.003390.0000
General
dbfile0.00070.1347170.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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