Thanks for your answer, but I think, that it would be better non-use parameters 
in URL (at most for subsidiary reasons), because of easy generating offline 
version of the web. That's why I want to use this type of URL (for example 
http://domain/html/en/article/10) as I wrote before.

Otmar Vobejda


Cituji z emailu od Ralph Seidl <[EMAIL PROTECTED]>:

> Hi O.Vobejda,
> 
> I don't have an answer to your question, but have you considered doing 
> something like this:
> 
> URL: article.html?id=102&lang=english
> or   article.pdf?id=102&lang=english
> 
> Sitemap:
> <map:match pattern="*.html">
>    <map:act type="Dispatcher" src="{0}">
>      <map:generate type="serverpages" src="logic/{xspPage}"/>
>      <map:transform src="stylesheets/{xslPage}"/>
>      <map:serialize type="html"/>
>    </map:act>
> </map:match>
> <map:match pattern="*.xml">
>    <map:act type="Dispatcher" src="{0}">
>      <map:generate type="serverpages" src="logic/{xspPage}"/>
>      <map:transform src="stylesheets/{xslPage}"/>
>      <map:serialize type="xml"/>
>    </map:act>
> </map:match>
> <map:match pattern="*.pdf">
>    <map:act type="Dispatcher" src="{0}">
>      <map:generate type="serverpages" src="logic/{xspPage}"/>
>      <map:transform src="stylesheets/{xslPage}"/>
>      <map:serialize type="pdf"/>
>    </map:act>
> </map:match>
> 
> So you need a dispatcher-action which delivers the values for {xspPage} 
> and {xslPage}. (Writing an action is simple :-) )
> In the action and in the XSP-page you can access 'id' and 'lang' as 
> request-parameters.
> 
> Hope this helps,
> 
> Ralph
> 
> PS: You can even do this: 
> foo.html?id=102&lang=english&page=article&type=html
> 
> [EMAIL PROTECTED] wrote:
> > Hi, I have a this problem. I'd like to put parsed pieces of URI into 
> > serverpages as parameters. For example: I have URI
> "html/english/article/102" 
> > (it means, that I want to get article with ID=102 in english language and
> in 
> > HTML format). Sitemap could look like as 
> > 
> > <map:match pattern="*/*/*/*">
> >   <map:generate type="serverpages" src="logic/{3}.xsp">
> >     <map:parameter name="format" value="{1}"/>
> >     <map:parameter name="language" value="{2}"/>
> >     <map:parameter name="id" value="{4}"/>
> >   </map:generate>
> >   <map:transform src="stylesheets/{3}to{1}.xsl"/>
> >   <map:serialize type="{1}"/>
> > </map:match>
> > 
> > I know, that <map:parameter> tag is nonsense, but how to get the pieces of
> URI 
> > {1}, {2}... into serverpages? (and how to read them in xsp script?). Yes,
> 
> > needed informations could be theoretically obtained by parsing URI in xsp
> 
> > script, but in this case will be not URL scheme transparent to scripts. (I
> can 
> > decide in the future, that URI will be not "html/english/article/102" but
> for 
> > example "english/html/article/102" - and then I will have to rewrite all
> the 
> > xsp scripts).
> > 
> > Is any possibility, how to do it?
> > 
> > PS. Another problem is in the tag <map:serialize type="{1}"/> - there is
> not 
> > substituted {1}.
> > 
> > 
> > ---------------------------------------------------------------------
> > 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]
> 




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

Reply via email to