ASF Bugzilla – Attachment 21081 Details for
Bug 43769
chainsaw refactoring of global and default sitemap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
update to current trunk
sitemap-cleanup.diff (text/plain), 11.51 KB, created by
J
on 2007-11-02 16:14:24 UTC
(
hide
)
Description:
update to current trunk
Filename:
MIME Type:
Creator:
J
Created:
2007-11-02 16:14:24 UTC
Size:
11.51 KB
patch
obsolete
>Index: src/README_SITEMAP_REFACTORING.txt >=================================================================== >--- src/README_SITEMAP_REFACTORING.txt (revision 0) >+++ src/README_SITEMAP_REFACTORING.txt (revision 0) >@@ -0,0 +1,30 @@ >+THIS IS WORK IN PROGRESS. DON'T USE IT FOR ANYTHING OTHER THAN PLAYING. >+ >+known to work: >+============== >+ >+index page, >+browsing around in authoring >+most usecases >+ >+known not to work: >+================== >+ >+bxe, >+tinymce >+requests of the form <pubname>/<area>/ (i.e. without a document specified) >+THIS IS WORK IN PROGRESS. DON'T USE IT FOR ANYTHING OTHER THAN PLAYING. >+ >+known to work: >+============== >+ >+index page, >+browsing around in authoring >+most usecases >+ >+known not to work: >+================== >+ >+bxe, >+tinymce >+requests of the form <pubname>/<area>/ (i.e. without a document specified) >Index: src/pubs/default/sitemap.xmap >=================================================================== >--- src/pubs/default/sitemap.xmap (revision 591462) >+++ src/pubs/default/sitemap.xmap (working copy) >@@ -21,22 +21,6 @@ > > <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> > >- <map:components> >- <map:transformers default="xslt"> >- <map:transformer name="metaData" logger="lenya.sitemap.transformer.metaData" src="org.apache.lenya.cms.cocoon.transformation.MetaDataTransformer"/> >- </map:transformers> >- <map:serializers default="xhtml"> >- <map:serializer logger="sitemap.serializer.links" name="links" src="org.apache.lenya.cms.cocoon.serialization.LinkSerializer"/> >- </map:serializers> >- </map:components> >- >- <map:views> >- <map:view from-position="last" name="links"> >- <map:serialize type="links" /> >- </map:view> >- </map:views> >- >- > <map:pipelines> > > <!-- This pipeline handles helper requests and metadata, not the actual publication documents --> >@@ -104,28 +88,7 @@ > > <map:pipeline type="caching"> > >- <!-- RSS formatting. >- FIXME: this should be handled by an RSS feed module! >- --> >- <map:match pattern="**.rss"> >- <map:generate src="{resource-type:format-rss}"/> >- <map:serialize type="xml"/> >- </map:match> >- >- <!-- FIXME: either this should be moved into a metadata module, or at least we need to establish >- some standard for magic extra suffixes and stick to it. >- Here we use .html.meta, bxe uses .bxe.html. >- --> >- <map:match pattern="*/**.html.meta"> >- <map:generate type="lenyaMetaData" src="lenya-document:{page-envelope:document-uuid},area={1}"/> >- <map:serialize type="xml"/> >- </map:match> >- <map:match pattern="**meta"> >- <map:generate type="lenyaMetaData" src="lenya-document:{request-param:uuid},lang={request-param:lang},pubid={request-param:pubid},area={request-param:area}"/> >- <map:serialize type="xml"/> >- </map:match> >- >- <!-- {1:rendertype}/{2:pub}/{3:area}/{4:path} --> >+ <!-- {1:rendertype}/{2:pub}/{3:area}/{4:path} --> > <map:match pattern="document-content/*/*/*/**"> > <map:act type="language-exists"> > <map:generate src="{resource-type:format-xhtml}?rendertype={../1}"/> >@@ -217,29 +180,6 @@ > <map:parameter name="title" value="{dublincore:title}"/> > </map:transform> > </map:act> >- >- <!-- This is a demonstration of the generic meta data transformer >- described in bug 39891. >- >- 1) define the ns: xmlns:meta="http://apache.org/lenya/meta/1.0/" >- 2) use it in above xsl like e.g. >- <meta:value ns="http://purl.org/dc/elements/1.1/" element="date" uuid="{@uuid}"/> >- >- Where @ns is the namespace for which you want to retrieve the @element for. >- If there is more then one element registered then the transformer returns: >- <value xmlns="http://apache.org/lenya/meta/1.0/" value="2005-09-11 12:44:05" element="date" /> >- <value xmlns="http://apache.org/lenya/meta/1.0/" value="2006-09-11 12:44:05" element="date" /> >- >- Otherwise it will return the value as characters. >- --> >- <map:transform type="metaData"> >- <map:parameter name='pubid' value='{page-envelope:publication-id}'/> >- <map:parameter name='area' value='{page-envelope:area}'/> >- </map:transform> >- <map:transform type="i18n"> >- <map:parameter name="locale" value="{page-envelope:language}"/> >- </map:transform> >- <map:transform type="uuid2url"/> > <map:serialize type="xml"/> > </map:match> > >@@ -252,16 +192,6 @@ > <map:pipeline> > > <!-- >- FIXME: this is a BXE-specific hack that should be handled by BXE's module sitemap. The publication >- should not be concerned with BXE-specific pre-processing of documents. >- --> >- <map:match pattern="**.bxe.html"> >- <map:generate src="cocoon:/lenyabody-edit/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}{page-envelope:document-path}"/> >- <map:transform type="proxy"/> >- <map:serialize type="xml"/> >- </map:match> >- >- <!-- > Finally: this matcher handles requests for publication documents. > /{1:area}/{2:document-path}.html > --> >@@ -330,12 +260,6 @@ > </map:otherwise> > </map:select> > >- <!-- >- strip xhtml namespace prefix to ensure compatibility with non-XML conformant browsers >- workaround to avoid empty script, style and textarea tags (firefox chokes on those) >- --> >- <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/> >- > <!-- client cache expiration settings --> > <map:select type="parameter"> > <map:parameter name="parameter-selector-test" value="{1}"/> >@@ -356,17 +280,8 @@ > </map:otherwise> > </map:select> > >- <!-- pretty-print output for easier debugging and for the benefit of new users >- NOTE: you may want to disable this in production for performance reasons, >- but it's on by default in the default publication to make the generated code >- easier to work with for new users. --> >- <map:transform src="fallback://lenya/modules/prettyprinting/xslt/xml2nicexml.xsl"/> >- >- <!-- the proxy transformer handles proxy-related URL rewriting --> >- <map:transform type="proxy"/> >- > <map:act type="language-exists"> >- <map:serialize type="xhtml"/> >+ <map:serialize/> > </map:act> > <!-- > When the requested document does not exist, we generate a nice error page. >@@ -407,11 +322,9 @@ > <map:parameter name="parameter-selector-test" value="{1}"/> > <map:when test="live"/> > <map:otherwise> >- <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}?doctype={page-envelope:document-type}"/> >+ <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}"/> > </map:otherwise> > </map:select> >- <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/> >- <map:transform type="proxy"/> > <map:serialize type="xhtml" status-code="404"/> > > </map:match> >Index: src/webapp/global-sitemap.xmap >=================================================================== >--- src/webapp/global-sitemap.xmap (revision 591450) >+++ src/webapp/global-sitemap.xmap (working copy) >@@ -27,17 +27,21 @@ > <map:parameter name="locale" value="{request:locale}"/> > </map:transform> > <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl"/> >+ <map:transform type="uuid2url"/> > <map:transform type="proxy"/> > <map:transform src="context://lenya/xslt/util/strip_namespaces.xsl"/> > <map:transform src="fallback://lenya/modules/prettyprinting/xslt/xml2nicexml.xsl"/> >+ <map:select type="parameter"> >+ <map:parameter name="parameter-selector-test" value="{HTTPStatus}"/> >+ <map:when test=""> >+ <map:serialize type="xhtml"/> >+ </map:when> >+ <map:otherwise> >+ <map:serialize type="xhtml" status-code="{HTTPStatus}"/> >+ </map:otherwise> >+ </map:select> > </map:resource> > >- <map:resource name="i18n"> >- <map:transform type="i18n"> >- <map:parameter name="locale" value="{request:locale}"/> >- </map:transform> >- </map:resource> >- > <!-- do proxy transformation on css files for url('') links --> > <map:resource name="proxy-css"> > <map:act type="resource-exists" >@@ -82,7 +86,7 @@ > <pipeline-expiration>now</pipeline-expiration> > </global-variables> > </map:component-configurations> >- >+ > <!-- create a list of publications for the global welcome page: --> > <map:pipeline> > <map:match pattern="aggregate-publications"> >@@ -154,7 +158,6 @@ > <map:parameter name="tabGroup" value="{usecase:tabGroup:{request-param:lenya.usecase}}"/> > <map:parameter name="newMessages" value="{inbox:newMessageCount}"/> > </map:transform> >- <map:call resource="i18n"/> > <!-- Generate the meta-stylesheet --> > <map:transform src="fallback://lenya/xslt/menu/menu2xslt.xsl"> > <map:parameter name="publicationid" value="{1}"/> >@@ -300,7 +303,6 @@ > </map:aggregate> > <map:transform src="lenya/xslt/util/welcome.xsl"/> > <map:call resource="style-cms-page"/> >- <map:serialize /> > </map:match> > > <!-- any root-level request is directed to the welcome page --> >@@ -356,7 +358,6 @@ > </map:aggregate> > <map:transform src="lenya/xslt/util/introduction.xsl"/> > <map:call resource="style-cms-page"/> >- <map:serialize /> > </map:match> > > </map:pipeline> >@@ -399,27 +400,26 @@ > </map:match> > </map:match> > >- <!-- delegate publication requests to the publication sitemap --> >- <map:match pattern="*/**"> >- <map:select type="parameter"> >- <map:parameter name="parameter-selector-test" value="{page-envelope:publication-id}"/> >- <map:when test=""> >- <map:generate type="jx" src="lenya/content/exception/publication-does-not-exist.jx"> >- <map:parameter name="publicationId" value="{1}"/> >- </map:generate> >- <map:transform type="i18n"> >- <map:parameter name="locale" value="{request:locale}"></map:parameter> >- </map:transform> >- <map:call resource="style-cms-page"/> >- <map:serialize status-code="404" /> >- </map:when> >- <map:otherwise> >- <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}" check-reload="true" reload-method="synchron"/> >- </map:otherwise> >- </map:select> >- </map:match> >- </map:pipeline> >+ <!-- delegate publication requests to the publication sitemap --> >+ <map:match pattern="*/**"> >+ <map:select type="parameter"> >+ <map:parameter name="parameter-selector-test" value="{page-envelope:publication-id}"/> >+ <map:when test=""> >+ <map:generate type="jx" src="lenya/content/exception/publication-does-not-exist.jx"> >+ <map:parameter name="publicationId" value="{1}"/> >+ </map:generate> >+ <map:call resource="style-cms-page"> >+ <map:parameter name="HTTPStatus" value="404"/> >+ </map:call> >+ </map:when> >+ <map:otherwise> >+ <map:generate src="cocoon:/{1}/{2}"/> >+ <map:call resource="style-cms-page"/> >+ </map:otherwise> >+ </map:select> >+ </map:match> >+ </map:pipeline> > >-</map:pipelines> >+ </map:pipelines> > > </map:sitemap>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43769
:
21076
|
21078
| 21081