Subject: RE: [xsl] XSL If Statement - Repost From: sumit patki <sumitpatki@xxxxxxxxxxx> Date: Fri, 22 Aug 2008 14:10:31 +0000 |
Thanks Mukul for your reply I tried all the options given by you and I get the following errors: 1. Expected token 'eof' found '='. matrix-->=<--'1' 2. Expected token 'eof' found '='. number(matrix)-->=<--1 3. Unknown method. -->normalize-space(matrix<--)='1' Could it be a problem in version of XSL processor. How can I know which version of XSL processor is used in my application? > Date: Fri, 22 Aug 2008 19:18:53 +0530 > From: gandhi.mukul@xxxxxxxxx > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] XSL If Statement - Repost > > if your context node is, 'detail' node, you can do as following, > > > > > > if you think, 'matrix' node can contain whitespaces, you should do, > > > > (You are missing single quotes around 1) > > Though, I have'nt tried this, but you can also try ... > > > > On Fri, Aug 22, 2008 at 7:05 PM, sumit patki wrote: >> >> >> >> Hi, >> I have a XSL file which is used to format 100s of xml files. The XSL >> converts xml to html.I need to display table in HTML output only if >> certain data is present in XML. >> >> >> In the below code, I need to display the HTML table only if the XML >> has matrix tag with 1 in it. Matrix tag will be present only in few >> xmls which use the xsl.I tried the below code but none of the options >> worked. >> >> XSL: >> xsl:for-each select="topic/detail"> >> >> xsl:if test="$matrix=1" OR >> xsl:if test="matrix=1" OR >> xsl:if match=".[matrix=1]" >> >> table border="2"> >> tr> >> . >> . >> . >> . >> XML: >> topic> >> detail> >> matrix>1 > > > -- > Regards, > Mukul Gandhi > _________________________________________________________________ Chose your Life Partner? Join MSN Matrimony FREE http://www.shaadi.com/msn/matrimony.php
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL If Statement - Repost, Mukul Gandhi | Thread | Re: [xsl] XSL If Statement - Repost, David Carlisle |
Re: [xsl] XSL If Statement - Repost, David Carlisle | Date | Re: [xsl] XSL If Statement - Repost, David Carlisle |
Month |