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 Mon, 21 Jan 2008 11:30:07 GMT
Johannes Schaefer wrote:
> Ross, Just to get my understanding right:
> 
> <snip/>
>>
>> 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.
> 
> 
> The transformation is from myDTD to Forrest's internal format.
> The <span> tag still isn't present in xdoc.
> 
> So this works because Forrest isn't so strict to validate the xml further
> down its processing pipeline. One may use the same feature (bug?) 
> writing an input plugin thus bypassing Forrests validation of its 
> internal format.
> 
> With other words:
>   Forrest validates the input files when read "from disk"
>   but afterwards is "sloppy" about validation and passes
>   unknown tags on to the output.
> 
> In the end <span> gets passed on to HTML and the browser knows how to
> handle it. Luckily. With a the tag named <funny-span> your content would
> not show up: browsers tend to ignore unknown tags (1).
> 
> Breaking other output formats means that either further processing steps
> fail because of unknown tags or these tags get ignored.
> 
> Am I right?

You are 100% correct :-)

Ross

> 
> This is because Forrest's xdoc is not very "rich" semantically.
> A switch to XHTML as internal format is envisioned for Forrest.
> This will offer more flexibility.
> 
> 
> Cheers
> Johannes
> 
> (1) You may see this effect when inspecting any HTML page of your Forrest
>     site with "body-" prefixed: there are <tocitems> in the source that
>     the browser ignore.
> 
> 
>>
>> Ross
>>
> 


Mime
View raw message