On Tue, 30 Oct 2001, Stefano Mazzocchi wrote: > Take a look at this sitemap fragment (used to generate our own docs): > > <map:match pattern="*.html"> > <map:aggregate element="site"> > <map:part src="cocoon:/book-{1}.xml"/> > <map:part src="cocoon:/body-{1}.xml"/> > </map:aggregate> > <map:transform src="stylesheets/site2xhtml.xsl"> > <map:parameter name="use-request-parameters" value="true"/> > <map:parameter name="header" value="graphics/{1}-header.jpg"/> > </map:transform> > <map:serialize/> > </map:match> > > <map:match pattern="**/*.html"> > <map:aggregate element="site"> > <map:part src="cocoon:/{1}/book-{1}/{2}.xml"/> > <map:part src="cocoon:/body-{1}/{2}.xml"/> > </map:aggregate> > <map:transform src="stylesheets/site2xhtml.xsl"> > <map:parameter name="use-request-parameters" value="true"/> > <map:parameter name="header" > value="{1}/graphics/{2}-header.jpg"/> > </map:transform> > <map:serialize/> > </map:match> > > they look so much equal it really bugs me there is no simple way to > collapse them into one. > > What do you think? I know I'm being overly picky but we should make an > effort to create the most clean sitemaps so that people learn from us. > > Also, > > <map:match pattern="**images/*.png"> > <map:read src="images/{2}.png" mime-type="image/png"/> > </map:match> > > <map:match pattern="**images/*.jpg"> > <map:read src="images/{2}.jpg" mime-type="image/jpeg"/> > </map:match> > > <map:match pattern="**images/*.gif"> > <map:read src="images/{2}.gif" mime-type="image/gif"/> > </map:match> > > could be condensed into > > <map:match pattern="**images/*.*"> > <map:read src="images/{2}.gif" mime-type="image/{3}"/> > </map:match> > > assuming that nothing but images are stored there.
I'm not sure but the mime-type attribute is not undergoing variable replacement so far. > > Thinking about it, for those like me who can't learn regexp (sorry, but > I don't have that mindset), what do you think about adding something > like > > <map:match pattern="**images/*.{gif|jpg|png}"> > <map:read src="images/{2}.gif" mime-type="image/{3}"/> > </map:match> You like us to mix wildcard and regex matching? Giacomo > > which prevents curly braces from being used in URI, but it could be > useful for many to reduce sitemap verbosity by far in many situations. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]