Thanks for your tip. 

I don't use XSP that much but it's useful to see that
you too are using workaroung. So I can stop digging
into the docs for some hidden method :)


--- Jan Hoskens <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I had the same problem to find the prefix in a
> subsitemap. I did not find a
> simple way to retreive it, but I just managed to
> develop a workaround in
> XSP:
> 
> (This is just a fragment, I'm using own tags and
> stuff that I replaced here)
> 
> <?xml version="1.0"?>
> <xsp:page
>  xmlns:xsp="http://apache.org/xsp";
>  >
> 
>  <xsp:structure>
>  
>
<xsp:include>org.apache.cocoon.environment.Environment</xsp:include>
> 
>
<xsp:include>org.apache.cocoon.components.CocoonComponentManager</xsp:includ
> e>
>  </xsp:structure>
> <html>
>     <body>
>         <xsp:logic>
>         try{
>             CocoonComponentManager m =
> (CocoonComponentManager)manager;
>             Environment env =
> m.getCurrentEnvironment();
>            
> <p><xsp:expr>env.getURIPrefix()</xsp:expr></p>
>         } catch(Exception e){
>             <p>e.toString()</p>
>         }
> </xsp:logic>
> </body>
> </html>
> </xsp:page>
> 
> This is just an xsp page that shows the prefix, if
> you create an XSPaction
> and save the result in a variable, you can pass it
> anywhere.
> I just found this and haven't tested it in all
> situations yet, but it seems
> to work.
> 
> Hope this helps;-)
> 
> Bye,
> 
> Jan
> ----- Original Message ----- 
> From: "Oscar Picasso" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 08, 2004 5:53 AM
> Subject: Getting the prefix URI form within a
> subsitemap
> 
> 
> > Hi,
> >
> > I am trying to retrieve the prefix URI from inside
> a
> > subsitemap.
> >
> > Let say I have:
> > +-- webapps
> >      +-- cocoon
> >          +-- my-app
> >
> > I would like to retrieve dynamically the string
> > "my-app" to construct some uris inside my
> generator.
> >
> > From what I have seen only the request object
> store
> > url/uri like strings and I have not seen
> 'prefix-uri'
> > or something like that.
> >
> > It would be convenient. Did I miss something?
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to