Cross-posting because this requirement originated on forrest but hits
Cocoon design.
Nicola Ken Barozzi wrote:
> Someone has time to fix-propose something better for link finding in the
> crawler?
The problem is: CSS may link to images and the Cocoon crawler isn't able
to recognize any hyperlinking behavior which is not included in a stream
of SAX events.
This is due to a design limitation of Cocoon views: only multi-staged
pipelines can have views.
If we had the ability to propose 'variants' of resources read by Cocoon
(via "map:read") then no changes to the Cocoon crawler will be required.
I feel this is the most elegant way to deal with the issue.
The question is: how do we assign a view to a read resource?
<map:readers>
<map:reader name="resource" class="default">
<map:view name="variantA" class="..."/>
<map:view name="variantB" class="..."/>
</map:reader>
</map:readers>
then, the usual,
<map:match pattern="...">
<map:read type="resource" src="..."/>
</map:match>
where is the sitemap engine to choose which class to use to read the
resource depending on the asked view.
For CSS, we could do
<map:readers>
<map:reader name="CSS-reader" class="ResourceReader">
<map:view name="links" class="CSSLinkReader"/>
</map:reader>
</map:readers>
then
<map:match pattern="**.css">
<map:read type="CSS-reader" src="{1}.css"/>
</map:match>
NOTE: asking for a different view might change the MIME-type.
What do you think?
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<[EMAIL PROTECTED]> Friedrich Nietzsche
--------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]