cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stevens (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1639) [patch] NekoHTMLTransformer
Date Wed, 18 Jan 2006 01:52:43 GMT
    [ http://issues.apache.org/jira/browse/COCOON-1639?page=comments#action_12363060 ] 

Andrew Stevens commented on COCOON-1639:
----------------------------------------

>1) In src/blocks/html/samples/sitemap.xmap, I replaced in pipeline HTMLTransformer/parsed.xml
the 
>"html" transformer with "nekohtml", but I cannot manage to make it run, see Cocoon Samples
at 
>/samples/blocks/html/HTMLTransformer/parsed.xml

Did you change the neko.properties at all to uncomment anything?  Judging by your stack trace,
the malformed URL seems to be thrown somewhere internal to Neko when it tries to parse its
configuration (which I set from the neko.properties file).  The bit about the protocol being
missing suggests to me that Neko creates URLs from the properties' keys (which are mostly
of the form http://cyberneko.org/html/... ) and has encountered an entry with a non-URL string
as the key.  Since I iterate over every entry in the property file's keyset and don't validate
them, I'm guessing this might be caused if the file contained a plain text line that wasn't
a comment?  It's a pity the URL constructor doesn't include the details of the string that
it doesn't like in the exception message :-(

>2) I notice some overlap (in other words copy/paste) between the two transformers. Can
you try to 
>factorize the common code, especially the configure() and setup() method?

If I remember rightly (it's some time since I even looked at this), there's probably no more
copy/paste than already exists between the JTidy and Neko based generators.  I can't remember
now which way round I did it, but to get the neko transformer I either started with the neko
generator and a diff of the JTidy generator/transformer, or the JTidy transformer and a diff
of the JTidy/Neko generators.  Mix well, and bake in a medium hot oven for two hours :-)


> [patch] NekoHTMLTransformer
> ---------------------------
>
>          Key: COCOON-1639
>          URL: http://issues.apache.org/jira/browse/COCOON-1639
>      Project: Cocoon
>         Type: Improvement
>   Components: Blocks: HTML
>     Versions: 2.1.8
>  Environment: Operating System: All
> Platform: All
>     Reporter: Andrew Stevens
>     Assignee: Cocoon Developers Team
>     Priority: Minor
>  Attachments: NekoHTMLTransformer.java, cocoon.log, htmlblock.diff, neko.properties
>
> The html block contains HTMLGenerator, HTMLTransformer, NekoHTMLGenerator and...
> hey, where's the NekoHTMLTransformer?
> So, just to complete the set, here's one I prepared earlier :-)
> I've also included an (empty) neko.properties configuration file, and updated
> the neko generator's setup bits to allow for setting parser features as well as
> properties.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message