cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stevens (JIRA)" <>
Subject [jira] Commented: (COCOON-1639) [patch] NekoHTMLTransformer
Date Wed, 18 Jan 2006 01:52:43 GMT
    [ ] 

Andrew Stevens commented on COCOON-1639:

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

Did you change the 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 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 ) 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:
>      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:, cocoon.log, htmlblock.diff,
> 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) 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:
For more information on JIRA, see:

View raw message