RE: [xsl] if/else xsl ?

Subject: RE: [xsl] if/else xsl ?
From: "Pierre" <pierre@xxxxxxxxxxxxx>
Date: Fri, 2 Jul 2004 12:29:51 +0200
Mmmm i don't see what's wrong here 
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0"
<xsl:output method="html" />
<xsl:template match="/">
<xsl:for-each select="formulaire/FRMFAT04001">
<table><form action="" method="post" name="form1">
<xsl:for-each select="*">
<xsl:value-of select="@desc" /> : </td><td>
<tr><td align="right">
	<xsl:when test="@desc=Pays">
	do another thing here...
		<xsl:element name="{@type}">
		<xsl:attribute name="size">
		<xsl:value-of select="@size" />
		<xsl:attribute name="maxlength">
		<xsl:value-of select="@size" />
		<xsl:attribute name="value">
		<xsl:value-of select="text()" />
		<xsl:attribute name="name">
		<xsl:value-of select="@name" />
<tr><td align="center" colspan="2"><input type="Submit" name="Submit"
value="Envoyer"/><input type="Reset" name="Reset" /></td></tr>

This is my xml

<?xml version="1.0" encoding="utf-8" ?>
		<c001 type="input" desc="Societe" size="32"
		<c002 type="input" desc="Adresse" size="32"
		<c003 type="input" desc="Complement" size="32"
		<c004 type="input" desc="Code postal" size="15"
		<c005 type="input" desc="Ville" size="32" name="005"></c005>
		<c006 type="input" desc="Comte/Cedex" size="32"
		<c007 type="input" desc="Pays" size="32" name="007"></c007> 
		<france iso="fr" option="France" />
		<allemagne iso="de" option="Allemagne" />

This is my error 

Warning: Sablotron error on line 8: XML parser error 7: mismatched tag

Please help with some explications to understand where I'm wrong and why ?
Thx to all


-----Message d'origine-----
De : Michael Müller-Hillebrand [mailto:info@xxxxxxxxxxxxx] 
Envoyé : vendredi 2 juillet 2004 11:12
À : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet : Re: [xsl] if/else xsl ?

It is not the shortest possibility, but that's the way XSL is doing this:

  <xsl:when test="...">
    if stuff
    else stuff

- Michael
On 02.07.2004 (11:58 Uhr +0200), Pierre wrote:

>Hi guy i search some docs about if - else in xsl but can't fin it
>Any idea plz ?
>i have this and I wanna when @desc="pays" do other thing how can I do it ?
>thx for help

Michael Müller-Hillebrand, Dipl.-Ing.    <>
    FrameMaker, FrameScript, XML/XSL,... Publishing-Lösungen

XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>

Current Thread