[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Complex expression


Subject: Re: [xsl] Complex expression
From: "Oleg Konovalov" <olegkon@xxxxxxxxx>
Date: Thu, 2 Mar 2006 11:55:48 -0500

Hi Charles,

I tried to get an XML input by inserting
<map:serialize type="html"/>
in Cocoon pipeline right before that XSL transformer,
but that didn't produce any HTML in the browser.
Unfortunately, there are no Cocoon debuggers to date,
project Lepido http://www.eclipse.org/lepido/  never came to fruition.
So it's a hell to support/debug Cocoon apps  ;-)

I think, my questions was simplier than that.
If you assume that the path to the Excel cell $row/sht:Cell/ is right,
how do you get (point to) an attribute ValueType for the cell with the
name "Start_Date".
I mean, what would be the correct syntax of that expression ?
Does that expression look right to you?
<xsl:if test='not($row/sht:Cell/sht:Name[.="Start_Date"]/@ValueType="DATE")'>
  ... do something
</xsl:if>

At least these 2 portions seem to work by themselves (but not combined
together)
in the other portions of XML transformer:
<xsl:if test='not($row/sht:Cell/sht:Name[.="Start_Date"])'> ...
<xsl:when test='@ValueType="DATE"'> ...

Or maybe there is a way to combine them in condition with an "and" ?

Thank you,
Oleg.


On 2/28/06, cknell@xxxxxxxxxx <cknell@xxxxxxxxxx> wrote:
> This question would be easy to answer if you included the relevant portion
of your XML document. Without that, you are gambling on catching the interest
of the subset of this list's subscribers who are intimately familiar with the
XML format of whatever version of Excel you are using.
> --
> Charles Knell
> cknell@xxxxxxxxxx - email
>
>
>
> -----Original Message-----
> From:     Oleg Konovalov <olegkon@xxxxxxxxx>
> Sent:     Tue, 28 Feb 2006 14:30:40 -0500
> To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  [xsl] Complex expression
>
> Hi,
>
> I am trying to modify existing XSL 1.0 code.
> Need to check if the type of the Excel cells in specific column Start_Date
> is indeed DATE.
>
> Is that syntax correct?
>
> <xsl:if
test='not($row/sht:Cell/sht:Name[.="Start_Date"]/@ValueType="DATE")'>
>  ... do something
> </xsl:if>
>
> (doesn't seem to work)
>
> Sorry for the newbie question.
>
> Thank you,
> Oleg.


Current Thread
Keywords