forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: [RT] A new Forrest implementation?
Date Fri, 18 Aug 2006 12:10:36 GMT
Gav.... wrote:
>>- XHTML2 as internal format
> 
> 
> Cool, does it work good?

Yes it works like a charm thanks to the work we already did in the 
aborted XHTMl2 plugin. I've reused the sample document you created and 
the stylesheet someone found for that work (sorry I can't remember who).

It needs more testing of course...

>>If we have a mime-type that gives us enough information it will use that
>>(i.e. an OOo document). If not it will try looking ahead into the
>>contents of the file until it has enough info. For example:
>>
>>while ((numRead = reader.read(buf)) != -1 && mimeType == null) {
>>   String readData = String.valueOf(buf, 0, numRead);
>>   fileData.append(readData);
>>   buf = new char[1024];
>>   if (fileData.toString().contains("<?xml")) {
>>         String type = getXMLDocumentType(fileData.toString());
>>	doc = new XMLSourceDocument(fileData.toString(), reader);
>>   }
>>}
>>
> 
> 
> Not totally foolproof this, that declaration could be in .html files, .php
> files could possibly contain no PHP whatsoever (useless waste but I've see
> it). 

Yes, of course, remember this is just a proof of concept protoype it's 
not supposed to be complete.

In order to support other inputs we need to add the necessary processing 
to this factory (actually, it would be done by a config file, but that's 
all for future work on a real implementation if we decide to go for it).

>>- decide if we should continue experimenting along this line.
> 
> 
> Sounds good to me, I'd like to see what you've got so far, so I can play and
> judge better. Can you put in in whiteboard, or would a branch be
> needed/preferred, either way is good for me.

I'm certainly willing to put it in the whiteboard but I'm not sure 
whether I should or not.

As a community, we do not have a consensus yet and I don't really want 
to go throwing code in to the mix until we have that consensus. I don't 
want to encourage anyone to work on this code at the expense of our 
existing core, we are thin on the ground as it is.

That being said, it may be helpful to see the code in order to bring 
about a consensus. What do others think? (I'm particularly interested in 
objections, I suspect there will be people who think the risk of 
splitting the community is too great at this stage of the discussion).

Ross

Mime
View raw message