cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nuno José Pires dos Santos <nsan...@electroplus.pt>
Subject RE: Newbie: ELSE-Statement in sitemap?
Date Wed, 28 Nov 2001 16:48:46 GMT
If you set a session attribute that doesn't exist it will probably
default to null, so what's the point?

If you really need it just use the session validate action like this

<map:act type="session-validate">
      <map:parameter name="descriptor"
value="context://descriptors/users.xml"/>
      <map:parameter name="validate" value="username"/>

  <!-- your code -->
</map:act>

<!-- your else code-->

-----Mensagem original-----
De: Tammo van Lessen [mailto:cusers-list@taval.de] 
Enviada: quarta-feira, 28 de Novembro de 2001 16:41
Para: cocoon-users@xml.apache.org
Assunto: Newbie: ELSE-Statement in sitemap?

Hi,

Is it possible to process an else-statement in the sitemap?

I need to check, if a sessionattribute is set and pass its value to the
xslt-transformer. if it is NOT set, i want to transform aswell, without
the
parameter.

<map:match type="sessionattribute" pattern="*">
	<map:parameter name="attribute-name" value="username"/>
	<map:transform src="docs/blah.xsl" type="xslt">
 		<map:parameter name="username" value="{1}"/>
	</map:transform>
</map:match>

ELSE
	<map:transform src="docs/blah.xsl" type="xslt">
 		<map:parameter name="username" value="{1}"/>
	</map:transform>

Or is it possible, to set a variable? Then I could use a selector...

Please help me!

Thanks!!!
  Tammo


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message