Fergus
xpathexp is out of scope in the <map:generate>. It is a parameter
and not a variable. The easy fix is to have 3 different calls to
<map:generate> and to move them into the <map:select>. You can leave
the <map:serialize> outside the <map:select>.
Steve
On 19 Apr 2007, at 17:07, Fergus McMenemie wrote:
Another beginner problem. Would somebody please point
out where I am going wrong with the following:-
The parameter xpathexp is not being seen by my generator.
<map:match type="wildcard" pattern="xpathdirectory/vehicles/*/*">
<map:select type="parameter">
<map:parameter name="parameter-selector-test" value="{2}"/>
<map:when test="car">
<map:parameter name="xpathexp" value="*/colour|*/miles/|*/age"/>
</map:when>
<map:when test="truck">
<map:parameter name="xpathexp" value="*/length|*/weight|*/
hours"/>
</map:when>
<map:otherwise>
<map:parameter name="xpathexp" value="*/colour|*/age|*/price"/>
</map:otherwise>
</map:select>
<!-- tried defining it here as well; to see if it was a
scoping issue
<map:parameter name="xpathexp" value="*/colour|*/age|*/
price"/>
-->
<map:generate type="xpathdirectory" src="{mydata:release}/
current/vehicles/{1}/{2}">
<map:parameter name="depth" value="1"/>
<map:parameter name="xmlFiles" value="m\d+\.xml$"/>
<map:parameter name="xpath" value="{xpathexp}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
Thanks in advance fergus.
--
===============================================================
Fergus McMenemie Email:[EMAIL PROTECTED]
Techmore Ltd Phone:(UK) 07721 376021
Unix/Mac/Intranets Analyst Programmer
===============================================================
---------------------------------------------------------------------
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]