xsl-list
[Top] [All Lists]

RE: A syntaxic problem this time

2004-07-02 15:09:40
Very large thanks to all for your help
I've learn a lot in a single day here, so many thanks
The encoding problem is ok I've just missed the encoding in the output :)


Pierre 

-----Message d'origine-----
De : Pieter Reint Siegers Kort 
[mailto:pieter(_dot_)siegers(_at_)elnorte(_dot_)com] 
Envoyé : vendredi 2 juillet 2004 22:59
À : xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Objet : RE: [xsl] A syntaxic problem this time 

Hi Pierre,

Try 

//pays

Instead of

../../SELECT/{desc}

HTH,
<prs/>

-----Original Message-----
From: Pierre [mailto:pierre(_at_)web-lance(_dot_)com] 
Sent: Friday, July 02, 2004 2:51 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] A syntaxic problem this time 

Sorry i forgot my xml : 
<?xml version="1.0" encoding="utf-8" ?>
<formulaire>
        <FRMFAT04001>
                <champs type="input">
                        <desc>Societe</desc>
                        <size>32</size>
                        <name>001</name>
                        <obligatoire>*</obligatoire>
                </champs>
                <champs type="input">
                        <desc>Adresse</desc>
                        <size>32</size>
                        <name>002</name>
                </champs>
                <champs type="select">
                        <desc>Pays</desc>
                        <name>003</name>
                </champs>
        </FRMFAT04001>
        <SELECT>
                <pays value="FR"><name>France</name></pays>
                <pays value="UK"><name>Royaumes Unis</name></pays>
        </SELECT>
</formulaire>

Pierre 

-----Message d'origine-----
De : Pierre [mailto:pierre(_at_)web-lance(_dot_)com] Envoyé : vendredi 2 
juillet 2004
20:49 À : Xsl-List Objet : [xsl] A syntaxic problem this time 

Hi all,
Please i'm trying to do that :
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method="html" />
        <xsl:template match="/">
        <xsl:for-each select="formulaire/FRMFAT04001/champs">
        <xsl:choose>
        <xsl:when test="@type='input'">
                <xsl:value-of select="desc" /><xsl:text> : </xsl:text>
                <input type="text" size="{size}" name="{name}"
/><xsl:value-of select="obligatoire" /><br />
                </xsl:when>
                <xsl:when test="@type='select'">
                <xsl:value-of select="desc" /><xsl:text> : </xsl:text>
                <select id="{name}" name="{name}">
                <xsl:for-each select="../../SELECT/{desc}">
         <xsl:element name="OPTION">
  <xsl:value-of select="name" />
  </xsl:element>
                </xsl:for-each>
                </select>
                </xsl:when>
                </xsl:choose>
        </xsl:for-each>
        </xsl:template>
</xsl:stylesheet>

I hope you understand what I wanna do, my problem is here xsl:for-each
select="../../SELECT/{desc}"> hox to say that I want select the desc.

Thanks to all

Pierre 



--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--





<Prev in Thread] Current Thread [Next in Thread>