forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: Howto use <div> or <span> within the document-dtd?
Date Fri, 18 Jan 2008 15:06:49 GMT
EMMEL Thomas wrote:
> Hi,
> 
> I wonder whether there is an easy way to add an own element to the dtd 
> like <span> or <div>?
> I wrote the main part in html that is converted on the fly to xml and 
> back to html. However, I use some special css-tricks to add layout to 
> the output like 'element:hover'-tips etc. by using <span class=...>.
> The problem is that this doesnt work in the xml-parts I use more and more.
> Running 'forrest run' the output is as expected since there is no
> xml-checking done.

Forrest is not intended to be a web publishing framework, as such it 
does not support many of the web-centric layout markup.

You can fudge things so that it will do what you want, but if you want a 
web publishing framework Forrest may not be the right tool for you.

Having said that. The easiest way to achieve what you want is to turn 
off validation for the pages you want to fudge. However, be aware that 
validation is there for a reason. By turning it off you run the risk of 
breaking some of the other output formats. You need to decide if this is 
a problem for you or not.

To control validation see 
http://forrest.apache.org/docs_0_80/validation.html#xml_validation

A better approach is to add your own DTD that supports the elements you 
want to use, see 
http://forrest.apache.org/docs_0_90/your-project.html#adding_new_content_type

Adding your own DTD with transformation to XDoc means you still validate 
the XML, which will prevent one set of funnies (i.e. badly formed XML), 
but it still leaves you open to breaking some output formats if your XSL 
keeps non-XDoc elements in the output.

Ross

Mime
View raw message