forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject Re: .cwiki question
Date Thu, 06 Feb 2003 15:59:13 GMT


On Thu, 6 Feb 2003, Nicola Ken Barozzi wrote:

>
>
> Stephan Michels wrote, On 06/02/2003 15.17:
> > On Thu, 6 Feb 2003, Nicola Ken Barozzi wrote:
> >
> >
> >>Cathy Zura wrote, On 06/02/2003 7.59:
> >>
> >>>I was able to display the cwiki file now, though I had to change it
> >>>slightly. It was choking on the
> >>>[http://xml.apache.org/forrest/] link. I removed the /forrest/ and it
> >>>displayed.
> >>
> >>Ah, yes, it chokes on this:
> >>
> >>   [http://xml.apache.org/forrest]
> >>                         ^
> >>If I use
> >>
> >>   [http://xml.apache.org]
> >>
> >>it works.
> >>
> >>It seems we need to tweak the wiki parsing. Stephan, what do you suggest
> >>about usinf the new Chaperon? Can we use a more comprehensive and
> >>complete wiki grammar? What are the things to do to switch to the new
> >>version?
> >
> >
> > There aren't many things todo, if you're using the text format for the
> > grammar.
> >
> > There will be some problem the mime-type, because I'm now use XMLizer
> > to create an XML stream of a text file. So you had to specify a mime type
> > mapping cwiki -> plain/text.
> > But for the CLI, there is no way to do this, I think. Perhaps you know
> > a possibility.
>
> I'm lost on this one, could you please explain again? Thanks :-)

Okay, the long version.

FileGenerator invokes SourceResolver.toSAX
SourceResolver inherits from HttpEnviroment
For getting the right XMLizer/SAXParser, the HttpEnviroment get the
mime type first
HttpEnviroment try first Source.getMimeType, but is in most cases null.
So HttpEnviroment try Context.getMimeType, and there you
can specify a mime type mapping in web.xml.

But if you are using the CLI you get the CLIEnviroment instead,
and this enviroment can only test Source.getMimeType().

If the XMLizer try to xmlize the source with null mime type, he will
always use the standard SAXParser ;-/

Do you see my point? Or am I wrong?

I was suprised that nobody noticed that before me, especially that
the jtidy xmlizer were not used for *.html .

> >>>Is the editing working in this
> >>>version? I didn't see anything that would put in editing links.
> >>
> >>No, it's not working yet. It's possible to create new wiki pages and
> >>have them saved, but it's very draft.
> >
> >
> > Do you want a more similar Wiki syntax like wiki.cocoon....?
>
> :-)
>
> > Gimme some days and I will check this.
>
> Yeah! :-D
>
> Make it the same syntax as the SubWiki (Subversion wiki) and it will be
> really coool. Imagine, we could make the site out of the wiki contents :-)
>
> --
> Nicola Ken Barozzi                   nicolaken@apache.org
>              - verba volant, scripta manent -
>     (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
>
>


Mime
View raw message