Forums / Developer / XHTML 1.0 validation

XHTML 1.0 validation

Author Message

Dominik Pich

Friday 19 December 2003 3:47:23 am

1. I _did_ search but found no answers.

I use ez3.2.3 but it generates many errors with the w3c validator.
ez doesn't convert &s right according to the validator and the attribute xmlns isnt valid on the tag section to which ez applies it.

Any fixes or ideas or blames :) Thanks, Dominik

Paul Forsyth

Friday 19 December 2003 4:27:07 am

3.2-3 had a lot of the xhtml 1.0 transitional bugs taken out, but try 3.2-4. its on pubsvn.ez.no right now.

I think it handles the & character properly now.

paul

Dominik Pich

Monday 22 December 2003 3:03:27 am

Line 77, column 83: character "&" is the first character of a delimiter but occurred as data

...rig/" title="Musikverlage Hans Gerig & Carlton Musikvertrieb Startseite" />
^
Line 80, column 113: character "&" is the first character of a delimiter but occurred as data

...title="Suche Musikverlage Hans Gerig & Carlton Musikvertrieb" />

---

Line 351, column 22: there is no attribute "CLASS" (explain...).

<TH CLASS="title" STYLE="background-color:#DF0023;">
^
Line 351, column 36: there is no attribute "STYLE" (explain...).

<TH CLASS="title" STYLE="background-color:#DF0023;">
^
Line 351, column 63: element "TH" undefined (explain...).

... <TH CLASS="title" STYLE="background-color:#DF0023;">
^
Line 353, column 21: there is no attribute "xmlns

<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
^
Line 354, column 21: there is no attribute "xmlns

xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
^
Line 355, column 22: there is no attribute "xmlns

xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
^
Line 355, column 66: element "section" undefined (explain...).

...custom="http://ez.no/namespaces/ezpublish3/custom/">
^
Line 356, column 12: element "paragraph" undefined (explain...).

<paragraph>Dezember &apos;03</paragraph>

---

ez still generates wrong xhtml... any options I need to tweak?

Bruce Morrison

Monday 22 December 2003 2:35:58 pm

Hi Dominik

It seems that ezpublish is outputing raw XML (section & paragraph tags) and not the transformed XHTML data. Where is your example taken from? Are you using attribute_view_gui function to display XML attributes in your templates?

Cheers
Bruce
http://www.designit.com.au

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Dominik Pich

Tuesday 23 December 2003 12:49:04 am

the intro attribute - is a non-xml text field.
NOT displayed with attribute_view_gui

Bård Farstad

Tuesday 23 December 2003 1:03:10 am

Dominik,

are you using the wash operator on your content?

E.g.
{$myvar|wash()}

This will convert & to  

--bård

Documentation: http://ez.no/doc

Dominik Pich

Tuesday 23 December 2003 4:27:42 am

<p class="news_intro">
{$node.data_map.intro.data_text}
{section show=$node.data_map.has_more.data_int|eq(1)}
 (<a class="more" href={$node.url_alias|ezurl}>mehr...</a>)
{/section}
</p>

If I use wash XML is converted but is plainly visible, if I dont wash, above code is generated.

Marco Zinn

Tuesday 23 December 2003 2:14:26 pm

Hi Dominik,
I'm german, too, but let's stay english.
Is your site public yet?
From your code snippets, i think:
The first two errors seem to be from the HTML head. You have an & in your site name (defined in the site.ini.append, right?). Probably, ezPublish does not wash these strings, but you cannot do anything about this, it's in the PHP code. Try changing the name in the .ini to something like "bla und bla", instead of "bla & bla" (just for testing).
The other really seems to be XML. If you used or re-used the original article class, then your intro IS XML and you should use attribute_view_gui do display it. This will generate (washed) XHTML from the "raw" XML data in the intro field.
If you don't want to use attribute_view_gui, you could use something like $node.data_map.intro.output.output_text to get HTML. See http://ez.no/developer/ez_publish_3/documentation/customization/custom_design/template_variables_set_by_ezpublish (middle of page) for some info on that datamapstuff.
BTW: For the "more"-stuff: You can use the is_empty operator to check, if the body contains data and, if so, print the "mehr" line.

Marco
http://www.hyperroad-design.com