Subject: [xsl] problem with xsl:when test From: psahoo@xxxxxxxxxxx Date: Fri, 30 Jan 2004 18:09:19 +0530 |
Hi Hope to get response to solve this ................................................ I have cretaed a xls which read a xml , where the nodes are dynamic . So for that I have written a when test statement in it to check the node type and depending upon the type (Struct_Element and Array_Element ) of node I show it as a hyperlink . But I face the follwoing problem .. 1. Suppose there is 3 (X ,Y and Z) nodes .Suppose X is of type Array_Element and others are not of type Array_Element or Struct_Element . But at the end I am getting all X,Y and Z are as hyperlink BUT IF there will be no node of type Array_Element or Struct_Element , it gives perfect result . version of xsl------------------------ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"> ----------------------------------------------------------------------------------------------------- I am giving the sample code <xsl:template match="//Output_List/*" > <tr> <td align="center"><xsl:value-of select="@Name" /></td> <td align="center"> <xsl:choose> <xsl:when test="//Output_List/*[nodeName()='Struct_Element' or nodeName()='Array_Element']"> <A href="datatypes.xml"><xsl:value-of select="@Type" /></A> </xsl:when> <xsl:otherwise> <xsl:value-of select="@Type" /> </xsl:otherwise> </xsl:choose> </td> <td align="center"><xsl:value-of select="@Comment" /></td> </tr> </xsl:template> Thanks & Regards Prasanta "DISCLAIMER: This message is proprietary to Hughes Software Systems Limited (HSS) and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. HSS accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Fwd: problem using the nodese, Gregor Neu | Thread | Re: [xsl] problem with xsl:when tes, David Carlisle |
RE: [xsl] Encoding attribute, David . Pawson | Date | [xsl] Modify one element ?, Lionel Crine |
Month |