locked
XSLT: <xsl:template match=""> match template using condition RRS feed

  • Question

  • User2090502034 posted

    Hi, I have created following xml file

    <Events>
    	<Event name="Proposal" Action="Insert">
    		<Fields>
    			<Field name="StaffId" 		Property="StaffId" />
    			<Field name="StaffName" 	Property="StaffName" />
    			<Field name="CustomerId" 	Property="CustomerId" />
    			<Field name="CustomerName" 	Property="CustomerName" />
    			<Field name="ProjectName" 	Property="ProjectName" />			
    		</Fields>		
    	</Event>
    	<Event name="Sale" Action="Insert">
    		<Fields>
    			<Field name="StaffId" 		Property="StaffId" />
    			<Field name="StaffName" 	Property="StaffName" />				
    		</Fields>		
    	</Event>
    </Events>

    Now, I want to create xsl file which will create a design based using <Fields>. And condition will be Name and Action from <Event>

    i.e. suppose for <Event Name="Proposal" Action="Insert">, I want to create design something like this

    "<a href=""><xsl:value-of select="StaffName"></a> Added new proposal"

    And for <Event Name="Sale" Action="Insert">, I want to create design something like this

    "<a href=""><xsl:value-of select="StaffName"></a> sold some stuff"

    How can I achive this?

    I am new to XSLT,so it could simple question..



    Tuesday, February 5, 2013 2:13 AM

All replies

  • User3866881 posted

    Hi,

    I want to confirm whether you want to fetch certain Field name with Property from Proposal or Sale and bind all the records to the GridView or something else?

    Wednesday, February 6, 2013 8:11 PM