forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: view/viewHelper XHTML code generation
Date Mon, 02 May 2005 15:38:17 GMT
Just a quick reply because I am just coming from the beach and have to
tranquilize my sunburn ASAP. ;-)

All questions already answered by Ross I will not answer. ;-) 

On Sun, 2005-05-01 at 22:51 -0700, Diwaker Gupta wrote:
> Hi everyone,
> 
> There are a number of small but important problems with the
> view/viewHelper XHTML code generation. Actually, my guess is that this
> is not really a problem of the plugin, since I believe the contract
> definition delegates the actual XHTML generation to Cocoon?
> 
> Anyways, basically I took one of the generated pages and ran it
> through W3's validator. Here are some of the major problems, and each
> one of them should be easily fixable. I'm happy to prepare a patch,
> only that I'm not very familiar with the code that does XHTML
> generation. So if someone can point me to it, I'll be glad to help.
> 

:)

It is mainly produced in the contracts which resides in
{viewHelper}/templates.

> o generated XHTML starts with an <?xml tag. I'm not sure thats the
> expected behavior. IIRC documents should start with the DOCTYPE tag.
> In the current setup, the validator returns a "DTD did not contain
> element declaration for document type name" error
> 
> o Then the root element of the XHTML seems to be a <xhtml> tag. There
> is NO such tag. Documents *must* have <html> as the root element.
> There are no attributes such as xmlns:forrest and xmlns:xi either. Why
> do we need them in the generated XHTML anyways?
> 

I will fix that after the sunburn. ;-)

> o Many of the "<a name='xxx'>" type tags generated (eg: for section
> headings) contain invalid characters. At some places spaces have been
> converted to "%". At other places, a long title has been shorted to 2
> words joined together by a "+" sign to generate the value of the
> 'name' attribute -- again, XHTML strict does not allow '+' sign in
> this context. Why go through all this trouble for character
> substitution? Just use spaces :)
> 

That is an old problem that we need to fix as well in views.

> o The feedback contract generates a div tag with an attribute
> xmlns:jx, which is again invalid. Why is this needed?
> 

This is from an old experiment of mine. 

...anyway namespaces *are allowed* in xhtml.
http://www.w3.org/TR/xhtml1/#well-formed

> Finally, validation will go a lot smoother if we just use XHTML
> transitional instead of XHTML strict for now. Once we validate
> transitional, we can push for strict. Though I'm all for aiming for
> strict from the beginning!
> 

:) I will help you with the patch and if you want to start with
transitional that is fine with me (we just have to try going for strict
before 0.8 gets out).

> cheers,
> Diwaker

Thanks for your work.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message