DE BEAUREPAIRE LUDOVIC wrote:
wrapped in map:select you may need to use {../my-sitemap-param} but if your real pipeline is not more complicated, you don't need it. Just make your action return only the valid options for your stylesheets ("test" and "other" in the example) and use:

    <map:act type="srvimp">
     <map:generate type="xsp" src="content/xsp/GENERAL.xsp"/>
     <map:transform src="style/xsl/{my-sitemap-param}.xsl"/>
     <map:serialize type="fo2pdf"/>
    </map:act>

HTH,
Geoff


I still need some of you help, I'm near the solution :
With your help, i have these results with, in my action :
        ...
        sitemapParams.put("feuille","sura001");
        sitemapParams.put("donnees","sura001");
        sitemapParams.put("SrvImpTypeRequete","ACROBAT");
        return sitemapParams;

1 - simple sitemap :
   <map:match pattern="test">
    <map:act type="test">
     <map:generate src="work/xml/{donnees}.xml"/>
     <map:transform src="work/xsl/{feuille}.xsl"/>
     <map:serialize type="fo2pdf"/>
    </map:act>
   </map:match>
it is OK !
        
2 - more complicated sitemap, the action send the new sitemap parameter : 
SrvImpTypeRequete (ACROBAT/ENREGISTRER), wrapped in a map:select
   <map:match pattern="edit">
    <map:act type="srvimp">
     <map:parameter name="srvImpTypeAction" value="EDIT"/>
     <map:select type="parameter">


I'm not sure a dynamic value will work here at all, but if it does, it should be referenced this way:
<map:parameter name="parameter-selector-test" value="{../SrvImpTypeRequete}"/>


        <map:when test="ENREGISTRER">
         <map:generate src="work/xml/sura001.xml"/>
         <map:serialize type="xml"/>
        </map:when>
        <map:otherwise>

I think this should be right. First try the above without changing this. If these still fail after that works, try another layer like {../../donnees} but I don't think that will be correct.
         <map:generate src="work/xml/{../donnees}.xml"/>
         <map:transform src="work/xsl/{../feuille}.xsl"/>
         <map:serialize type="fo2pdf"/>
        </map:otherwise>
      </map:select>
    </map:act>


it is NOK, the parameter is empty :
        java.io.FileNotFoundException: 
C:\axonie\clients\Infolis\work\jakarta-tomcat-4.1.18\webapps\srvimp2\work\xsl\.xsl

3 - the same with    "work/xml/{donnees}.xml"        instead of    
"work/xml/{../donnees}.xml"
it is NOK, a strange behavior occures, my action seems to be re-called, it makes 
errors.

Here is my situation, thanks if you can help me.

You may be able to refactory your pipelines a little bit to get out of this situation. Also, I've not used the parameter selector, so don't know enough to say whether that's the problem. If it doesn't all work, maybe write out what you need to do and why you approached it this way and perhaps someone can help you find an alternative solution.


Geoff


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



Reply via email to