> From: Matthew Hailstone [mailto:[EMAIL PROTECTED]]
> 
> Vadim:
> 
> Thank you for that simple suggestion. Here is my final modification in
> the sub sitemap that worked.
> One simple part that I didn't understand that I do now that I'll pass
> along is the map:parameter name attribute needs to be
> "parameter-selector-test" and the map:when attribute has to be "test".
> To confirm my conclusion, is the following construct true?
> 
> map:parameter name"parameter-selector-myownname"

No, it must be "parameter-selector-test" - see selector source code, it
is hardcoded.


> map:when myownname

map:when does support only one attribute, "test", according to sitemap
language (semi-written) specification. See mount/lint/sitemap.xmap - it
is an attempt to show all possible sitemap language constructs.

Suffix "-test" is just a coincidence.

Vadim


>       <map:match pattern="*/*.*">
>         <map:select type="parameter">
>           <map:parameter name="parameter-selector-test" value="{3}"/>
>           <map:when test="query">
>                   <map:generate type="serverpages"
> src="documents/{1}/{2}.xsp"/>
>           </map:when>
>           <map:otherwise>
>                   <map:generate src="documents/{1}/{2}.xml"/>
>           </map:otherwise>
>         </map:select>
>         <map:transform src="stylesheets/{3}.xsl">
>           <map:parameter name="section" value="{1}"/>
>           <map:parameter name="toc-file"
value="../documents/toc.xml"/>
>           <map:parameter name="base-url" value="/cocoon/eval"/>
>         </map:transform>
>         <map:transform src="stylesheets/menupage.xsl">
>           <map:parameter name="section" value="{1}"/>
>           <map:parameter name="request-url" value="{2}.{3}"/>
>           <map:parameter name="toc-file"
value="../documents/toc.xml"/>
>           <map:parameter name="css-stylesheet" value="default.css"/>
>           <map:parameter name="base-url" value="/cocoon/eval"/>
>         </map:transform>
>         <map:serialize/>
>       </map:match>
> 
> Thanks again for the great help.
> 
> Matthew
> 
> > -----Original Message-----
> > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 14, 2002 9:46 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Reuse of matches or pipelines
> >
> >
> > Matthew:
> >
> >
> > Try ParameterSelector (declare it first in the map:selectors
section):
> >
> >
> > >        <map:match pattern="*/*.*">
> >
> > <map:select type="xxxxxx">
> >   <map:parameter name="parameter-selector-test" value="{3}"/>
> >   <map:when test="query">
> >           <map:generate type="serverpages"
> > src="documents/{1}/{2}.xsp"/>
> >   </map:when>
> >   <map:otherwise>
> >           <map:generate src="documents/{1}/{2}.xml"/>
> >   </map:otherwise>
> > </map:select>
> >
> > >          <map:transform src="stylesheets/{3}.xsl">
> > >            <map:parameter name="section" value="{1}"/>
> > >            <map:parameter name="toc-file"
> > value="../documents/toc.xml"/>
> > >            <map:parameter name="base-url" value="/cocoon/eval"/>
> > >          </map:transform>
> > >          <map:transform src="stylesheets/menupage.xsl">
> > >            <map:parameter name="section" value="{1}"/>
> > >            <map:parameter name="request-url" value="{2}.{3}"/>
> > >            <map:parameter name="toc-file"
> > value="../documents/toc.xml"/>
> > >            <map:parameter name="css-stylesheet"
> > value="default.css"/>
> > >            <map:parameter name="base-url" value="/cocoon/eval"/>
> > >          </map:transform>
> > >          <map:serialize/>
> > >        </map:match>
> >
> > Vadim
> >
> > --
> > Resistance is futile.
> >
> > > -----Original Message-----
> > > From: Matthew Hailstone [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, May 14, 2002 11:14 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Reuse of matches or pipelines
> > >
> > > The two following matches are in a single pipeline. You'll
> > notice that
> > the
> > > second transform element in each match is practically the same. Is
> > there
> > > any way that I can utilize the more generic second match during
the
> > > execution of the first match by having two pipelines, or some
other
> > > configuration setup? Obviously I'm new to this. Thanks in advance.
> > >
> > >        <map:match pattern="*/*.query">
> > >          <map:generate type="serverpages"
> > src="documents/{1}/{2}.xsp"/>
> > >          <map:transform src="stylesheets/query.xsl">
> > >            <map:parameter name="section" value="{1}"/>
> > >            <map:parameter name="toc-file"
> > value="../documents/toc.xml"/>
> > >            <map:parameter name="base-url" value="/cocoon/eval"/>
> > >          </map:transform>
> > >          <map:transform src="stylesheets/menupage.xsl">
> > >            <map:parameter name="section" value="{1}"/>
> > >            <map:parameter name="request-url" value="{2}.query"/>
> > >            <map:parameter name="toc-file"
> > value="../documents/toc.xml"/>
> > >            <map:parameter name="css-stylesheet"
> > value="default.css"/>
> > >            <map:parameter name="base-url" value="/cocoon/eval"/>
> > >          </map:transform>
> > >          <map:serialize/>
> > >        </map:match>
> > >        <map:match pattern="*/*.*">
> > >          <map:generate src="documents/{1}/{2}.xml"/>
> > >          <map:transform src="stylesheets/{3}.xsl">
> > >            <map:parameter name="section" value="{1}"/>
> > >            <map:parameter name="toc-file"
> > value="../documents/toc.xml"/>
> > >            <map:parameter name="base-url" value="/cocoon/eval"/>
> > >          </map:transform>
> > >          <map:transform src="stylesheets/menupage.xsl">
> > >            <map:parameter name="section" value="{1}"/>
> > >            <map:parameter name="request-url" value="{2}.{3}"/>
> > >            <map:parameter name="toc-file"
> > value="../documents/toc.xml"/>
> > >            <map:parameter name="css-stylesheet"
> > value="default.css"/>
> > >            <map:parameter name="base-url" value="/cocoon/eval"/>
> > >          </map:transform>
> > >          <map:serialize/>
> > >        </map:match>
> > >
> > >
> > > Matthew
> >
> >
> >
---------------------------------------------------------------------
> > Please check that your question has not already been answered
> > in the FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to