lenya-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Nettingsmeier <netti...@apache.org>
Subject resource type format question
Date Sun, 29 Jul 2007 13:48:26 GMT
hi everyone!

trying to nail down the asset problem (format=downloadLink breaking

how are resource type formats supposed to work? are they all strictly
internal-only, or should i be able to request them via browser as well?

when i create an asset FOO.png under /index and request
/default/authoring/index/FOO.png?format=downloadLink, i get standard
rendering of the page, not (as i believe i should) just the xhtml
snippet from xslt/downloadLink.xsl. same if i try format=icon or similar.

btw, here's a suggestion (after wading through many a convoluted
sitemap): can we please stop this nonsense of using arbitrary pseudo
"file names" like "xhtml.xml" as matcher patterns? these are totally
obscure, give no clue what they are about and worst of all imply there's 
an actual file resource somewhere. [1]
how about using self-explanatory names? for instance, the resource
module implements several formats, all named "something.xml". why not
just match for "format-downloadLink", "format-webDAV",
"format-whatever", where the part after the dash matches what's declared
as format identifier in config/cocooc-xconf/module.xconf?

i'm also not sure whether we should maintain the configurable format uri
in the xconf files. why not set up the convention that resource type
formats are to be implemented as "format-FOO" and get rid of the
indirection? or are there examples where the current approach is
absolutely necessary?



[1] to drive the point home:

nettings@hoppetosse:/srv/lenya/server/build/lenya/webapp/WEB-INF> grep 
"format name" cocoon.xconf  | sort
<format name="collection" uri="cocoon://modules/collection/collection.xml"/>
<format name="downloadLink"
<format name="header" uri="cocoon://modules/news/header.xml"/>
<format name="icon" uri="cocoon://modules/resource/icon"/>
<format name="icon" uri="cocoon://modules/xhtml/icon"/>
<format name="include" uri="cocoon://modules/news/include.xml"/>
<format name="luceneIndex" uri="cocoon://modules/xhtml/lucene-index"/>
<format name="luceneIndex" uri="cocoon://modules/xhtml/lucene-index"/>
<format name="luceneIndex" uri="cocoon://modules/xhtml/lucene-index"/>
<format name="rss" uri="cocoon://modules/news/rss.xml"/>
<format name="webdavGET" uri="cocoon://modules/opendocument/davget.xml"/>
<format name="webdavGET" uri="cocoon://modules/xhtml/davget.xml"/>
<format name="webdavGET" uri="cocoon://modules/xhtml/davget.xml"/>
<format name="webdavGET" uri="cocoon://modules/xhtml/davget.xml"/>
<format name="xhtml" uri="cocoon://modules/cforms/xhtml.xml"/>
<format name="xhtml" uri="cocoon://modules/homepage/xhtml.xml"/>
<format name="xhtml" uri="cocoon://modules/links/xhtml.xml"/>
<format name="xhtml" uri="cocoon://modules/news/xhtml.xml"/>
<format name="xhtml" uri="cocoon://modules/opendocument/xhtml.xml"/>
<format name="xhtml" uri="cocoon://modules/resource/xhtml.xml"/>
<format name="xhtml" uri="cocoon://modules/usecasedocument/usecase.xml"/>
<format name="xhtml" uri="cocoon://modules/xhtml/xhtml.xml"/>
<format name="xslt-clean" 
<format name="xslt-clean" 

i think we're just being nasty to users and developers alike :)

Jörn Nettingsmeier

Kurt is up in heaven now.

To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org

View raw message