You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ashish Kulkarni <as...@gmail.com> on 2009/10/30 15:52:47 UTC
How to debug why xsl:if condition is not working
Hi
I am trying to work on this condition, but for some reason it is not
working, i dont get any output on my PDF file, if i remove the condition
then the text is printed, how do i debug why test condition is not working
<xsl:variable name="type" select="record/PCORIG"></xsl:variable>
<xsl:variable name="local" select="L"></xsl:variable>
<xsl:if test="$type=$local">
<fo:block>
LOS IMPORTES EXPRESADOS NO INCLUYEN I.V.A.
</fo:block>
</xsl:if>
i know record/PCORIG has value L, i also tried to set as below and try to
run, but still with no luck
<xsl:variable name="type" select="L"></xsl:variable>
--
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com
Re: How to debug why xsl:if condition is not working
Posted by Venkat Reddy <va...@googlemail.com>.
Hi,
Can you try with this .... this should work
<xsl:variable name="local">L</xsl:variable>
Thanks,
Venkat.
Ashish Kulkarni wrote:
> Hi
> I am trying to work on this condition, but for some reason it is not
> working, i dont get any output on my PDF file, if i remove the
> condition then the text is printed, how do i debug why test condition
> is not working
>
>
> <xsl:variable name="type" select="record/PCORIG"></xsl:variable>
> <xsl:variable name="local" select="L"></xsl:variable>
> <xsl:if test="$type=$local">
> <fo:block>
> LOS IMPORTES EXPRESADOS NO INCLUYEN I.V.A.
> </fo:block>
> </xsl:if>
>
>
> i know record/PCORIG has value L, i also tried to set as below and
> try to run, but still with no luck
>
> <xsl:variable name="type" select="L"></xsl:variable>
> --
> Ashish
> www.ayurwellness.com <http://www.ayurwellness.com>
> www.mysoftwareneeds.com <http://www.mysoftwareneeds.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to debug why xsl:if condition is not working
Posted by Ashish Kulkarni <as...@gmail.com>.
Hi
What i am trying to compare is if record/PCORIG is of value 'L' then print
text from <fo:block>
so if i convert to sudo code it must be like this
if(record/PCORIG = 'L')
{
print (LOS IMPORTES EXPRESADOS NO INCLUYEN I.V.A.)
}
On Fri, Oct 30, 2009 at 11:08 AM, Pascal Sancho <pa...@takoma.fr>wrote:
> Hi,
>
> Ashish Kulkarni a écrit :
>
> Hi
>> I am trying to work on this condition, but for some reason it is not
>> working, i dont get any output on my PDF file, if i remove the condition
>> then the text is printed, how do i debug why test condition is not working
>>
>>
>> <xsl:variable name="type" select="record/PCORIG"></xsl:variable>
>> <xsl:variable name="local" select="L"></xsl:variable>
>> <xsl:if test="$type=$local">
>> <fo:block>
>> LOS IMPORTES EXPRESADOS NO INCLUYEN I.V.A.
>> </fo:block>
>> </xsl:if>
>>
>> i know record/PCORIG has value L, i also tried to set as below and try to
>> run, but still with no luck
>> <xsl:variable name="type" select="L"></xsl:variable>
>> --
>> Ashish
>>
> <xsl:variable name="local" select="L"> means the <L> element.
> I guess you want to check if $type equals to the text node "L".
> In this case:
> you should write:
> either: <xsl:variable name="local" select="'L'"/>
> or: <xsl:variable name="local">L</xsl:variable>
>
> Pascal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
--
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com
Re: How to debug why xsl:if condition is not working
Posted by Pascal Sancho <pa...@takoma.fr>.
Hi,
Ashish Kulkarni a écrit :
> Hi
> I am trying to work on this condition, but for some reason it is not
> working, i dont get any output on my PDF file, if i remove the
> condition then the text is printed, how do i debug why test condition
> is not working
>
>
> <xsl:variable name="type" select="record/PCORIG"></xsl:variable>
> <xsl:variable name="local" select="L"></xsl:variable>
> <xsl:if test="$type=$local">
> <fo:block>
> LOS IMPORTES EXPRESADOS NO INCLUYEN I.V.A.
> </fo:block>
> </xsl:if>
>
> i know record/PCORIG has value L, i also tried to set as below and
> try to run, but still with no luck
> <xsl:variable name="type" select="L"></xsl:variable>
> --
> Ashish
<xsl:variable name="local" select="L"> means the <L> element.
I guess you want to check if $type equals to the text node "L".
In this case:
you should write:
either: <xsl:variable name="local" select="'L'"/>
or: <xsl:variable name="local">L</xsl:variable>
Pascal
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org