This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: If.. then OR xsl:choose question


See below...
hth,
   Matthew L. Avizinis <mailto:mla@gleim.com>
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772 ext. 101
      www.gleim.com <http://www.gleim.com>


> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Meir
> Sent: Tuesday, June 18, 2002 2:18 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: Re: [xsl] If.. then OR xsl:choose question
>
>
> Hello List
> i still geting this erorr :
>
>
>   End tag 'xsl:choose' does not match the start tag 'div'. Error
> processing
> resource 'file:///C:/Inetpub/wwwroot/Site/flashCTL.xsl'. Line 18,
> Position 3
>
> </xsl:choose>
> --^
>   here is the full xsl page with your changes
>
>
>
>   <xsl:stylesheet  version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   <xsl:template match="/">
>     <xsl:apply-templates />
>   </xsl:template>
>   <xsl:template match="Dir">
    <xsl:choose>  <!-- Here's what you're missing. -->
    ^^^^^^^^^^^
>   <div>
>   <xsl:when test="@pos='First'">
>    <xsl:attribute name="Style">border:'1px solid
> green';padding-left:20</xsl:attribute>
>   </xsl:when>
>   <xsl:otherwise>
>    <xsl:attribute name="Style">border:'1px solid
> green';padding-left:20</xsl:attribute>
>   </xsl:otherwise>
>   </xsl:choose>
>   <span style="border:'1px solid red';width:auto">
>   <xsl:value-of select="name()"/><xsl:text>=</xsl:text> <xsl:value-of
> select="./@id"/>
>     </span>
>   <xsl:apply-templates />
>   </div>
>   </xsl:template>
>   <xsl:template match="File">
>    <br/><span style="border:'1px solid black';width:auto;padding-left:20">
>      <xsl:value-of select="name()"/><xsl:text>=</xsl:text> <xsl:value-of
> select="./@id"/>
>    </span>
>   </xsl:template>
>   </xsl:stylesheet>
>
>
>   what is wrong here ..? the closeing div have to be there by the
> way co'z i
> need it to close some section of the xml file.
>
>   tnx
>
>
> ----- Original Message -----
> From: "Bill Curtis" <digitalmetrics@yahoo.com>
> To: <xsl-list@lists.mulberrytech.com>
> Sent: Monday, June 17, 2002 12:39 PM
> Subject: Re: [xsl] If.. then OR xsl:choose question
>
>
> > try this
> >
> > <DIV>
> > <xsl:choose>
> > <xsl:when test="@pos='First'">
> > <xsl:attribute name="Style">border:'1px solid
> > green';padding-left:20</xsl:attribute>
> > </xsl:when>
> > <xsl:otherwise>
> > <xsl:attribute name="Style">border:'1px solid
> > green'</xsl:attribute>
> > </xsl:otherwise>
> > </xsl:choose>
> > </DIV>
> >
> > --- Meir <umen@netvision.net.il> wrote:
> > > Hello list
> > > Tell me please if i like in xsl file
> > > to make simple if ..then state
> > > but to tell the xsl some thing like this :
> > >
> > > <xsl:when test="@pos='First'">
> > >  <div style="border:'1px solid
> > > green';padding-left:20">
> > > </xsl:when>
> > > <xsl:otherwise>
> > >  <div style="border:'1px solid green'">
> > >   </xsl:otherwise>
> > > </xsl:choose>
> > >
> > > as you see im trying to make the if based on
> > > ="@pos='First' But its giving
> > > me error
> > > that i have to include the closing <div> tag .. but
> > > i can't cos it will
> > > break the xsl proceeding order, so is there any way
> > > to make
> > > xsl to pick the right div?
> > >
> > > tnx
> > >
> > >
> > >
> > >
> > >
> > >  XSL-List info and archive:
> > > http://www.mulberrytech.com/xsl/xsl-list
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]