cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "peter" <>
Subject Re: Knowledge of sitemap from input module
Date Mon, 27 Mar 2006 13:35:57 GMT
On Sun, 26 Mar 2006 20:40:26 -0500, Tim Williams wrote
> How might I figure out what the calling sitemap is for a given input
> module request?  In other words if I have: lm:my.resource, how could 
> I figure out that that this request happens to be coming from some-
> mounted-sitemap.xmap?  We basically want this to be output for 
> debugging information[1].

sitemap.xmap files are all XML, so (if n>1 and you know their locations),
you could scan them in turn in XSLT with something like

   <xsl:param name="myresource"/>
     <xsl:when test="document('/path/to/potential/sitemap.xmap')
       do stuff
     ...more whens...
       dunno how we got here

But it will be fairly slow...and tedious to maintain, and you'd need to
be able to pattern-match the @pattern, which is probably non-trivial in
XSLT 1.0.

Maybe edit your sitemaps to pass a parameter to all transformations
identifying the location of the sitemap that matched?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message