On 3/27/06, peter <[EMAIL PROTECTED]> wrote:
> 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:choose>
> <xsl:when test="document('/path/to/potential/sitemap.xmap')
> //map:match[contains(@pattern,$myresource)]">
> do stuff
> </xsl:when>
> ...more whens...
> <xsl:otherwise>
> dunno how we got here
> </xsl:otherwise>
> </xsl:choose>
>
> 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?
>
> ///Peter
>
> ///Peter
Thank Peter, but I was really asking for within the Input Module
(java) implementation at runtime so that I can log debug lines with
it. In other words is there some way from the environment/service
manager/etc. for me to figure out what sitemap.xmap an input module
request is coming from - inside MyInputModule.getAttribute()
Thanks,
--tim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]