Subject: RE: [xsl] A syntaxic problem this time From: "Pierre" <pierre@xxxxxxxxxxxxx> Date: Sat, 3 Jul 2004 00:09:40 +0200 |
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.siegers@xxxxxxxxxxx] Envoyé : vendredi 2 juillet 2004 22:59 À : xsl-list@xxxxxxxxxxxxxxxxxxxxxx Objet : RE: [xsl] A syntaxic problem this time Hi Pierre, Try //pays Instead of ../../SELECT/{desc} HTH, <prs/> -----Original Message----- From: Pierre [mailto:pierre@xxxxxxxxxxxxx] Sent: Friday, July 02, 2004 2:51 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxx] 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@xxxxxxxxxxxxxxxxxxxxxx> --+-- --+------------------------------------------------------------------ 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@xxxxxxxxxxxxxxxxxxxxxx> --+-- --+------------------------------------------------------------------ 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@xxxxxxxxxxxxxxxxxxxxxx> --+--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] A syntaxic problem this t, Pieter Reint Siegers | Thread | RE: [xsl] XSLT and PHP, Wendi Turner |
RE: [xsl] A syntaxic problem this t, Pieter Reint Siegers | Date | RE: [xsl] XSLT and PHP, Michael Kay |
Month |