RE: xsl + xsl -- xsl

Subject: RE: xsl + xsl -- xsl
From: David Schach <davidsch@xxxxxxxxxxxxx>
Date: Mon, 11 Jan 1999 22:27:38 -0800
If you want to generate <xsl:attribute name = "COLSPAN"> in the output then
you should write 
	<xsl:element name = "xsl:attribute"><xsl:attribute name =
"name">COLSPAN</xsl:attribute></xsl:element>

> -----Original Message-----
> From:	alan dennis [SMTP:alan_l_dennis@xxxxxxxxxxx]
> Sent:	Friday, December 11, 1998 5:42 AM
> To:	xsl-list@xxxxxxxxxxxxxxxx
> Subject:	RE: xsl + xsl -- xsl
> 
> This results in something like
>  &lt;xsl:attribute name="COLSPAN"&gt;
> 
> Which looks right in an html browser but is not what I wanted to 
> produce. I played with xsl:eval for a bit but it won't produce tags, for 
> instance if you have
> <xsl:eval>"<xsl:attribute name = 
> 'COLSPAN'>foo</xsl:attribute>";</xsl:eval> Microsoft kindly deletes 
> "<xsl:attribute..." and "</xsl:attribute>" from the string.
> 
> However I stumbled on an answer that at least seems to work:
> 
> <xsl:template match="xsl:attribute">
>   <xsl:choose>
>     <xsl:when match="*[@name $eq$ 'n-columns-spanned']">
>       <xsl:copy>
>         <xsl:for-each match="@*">
>           <xsl:attribute name="name">COLSPAN</xsl:attribute>
>          </xsl:for-each>
>          <xsl:apply-templates/>
>       </xsl:copy>
>     </xsl:when>
>     <xsl:otherwise>
>       <xsl:copy>
>          <xsl:for-each match="@*">
>              <xsl:attribute><xsl:value-of/></xsl:attribute>
>          </xsl:for-each> 
>          <xsl:apply-templates/>      
>       </xsl:copy>
>     </xsl:otherwise>
>   </xsl:choose>
> </xsl:template>
> 
> Thanks for your help,
> Alan.
> 
> ----Original Message Follows----
> From: "Vun Kannon, David" <dvunkannon@xxxxxxxx>
> To: "'xsl-list@xxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxx>
> Subject: RE: xsl + xsl -> xsl
> Date: Thu, 10 Dec 1998 18:59:01 -0500
> Reply-To: xsl-list@xxxxxxxxxxxxxxxx
> 
> Try escaping the opening of the XSL tags that you want in the output 
> with
> &gt;. This should disambiguate what is essentially text and what is 
> active. 
> Cheers,
> David
> 
> > -----Original Message-----
> > From:	alan dennis [SMTP:alan_l_dennis@xxxxxxxxxxx]
> > Sent:	Thursday, December 10, 1998 4:24 PM
> > To:	xsl-list@xxxxxxxxxxxxxxxx
> > Subject:	xsl + xsl -> xsl
> > 
> > Hello,
> > 
> > I would like to transform XSL using XSL.  The idea here is to have 
> > device independent XSL that represents general layout and then apply a 
> > device specific XSL and take the result and apply it to XML.  My 
> problem 
> > at this point is I can't seem to modify an attribute tag.  Here's an 
> > example:
> > 
> > <table-cell>
> > <xsl:attribute name="n-columns-spanned"><xsl:value-of 
> > select="//YAXIS/@MAXDESCCOUNT"/></xsl:attribute>
> > <xsl:attribute name="n-rows-spanned"><xsl:value-of 
> > select="//XAXIS/@ROWCOUNT"/></xsl:attribute>
> > </table-cell>
> > 
> > should turn into plain old
> > 
> > <TD>
> > <xsl:attribute name="COLSPAN">
> > <xsl:value-of select="//YAXIS/@MAXDESCCOUNT"/>
> > </xsl:attribute>
> > <xsl:attribute name="ROWSPAN"><xsl:value-of 
> > select="//XAXIS/@ROWCOUNT"/></xsl:attribute>
> > </TD>
> > 
> > However I can't seem to insert an xsl:attribute tag without it being 
> > interpreted as my wanting to add an attribute.  
> > 
> > My motivation for doing the transformation in this order is that the 
> XML 
> > involved is much larger than the XSLs.
> > 
> > I'm using IE5's MSXML parser.
> > 
> > Thanks,
> > Alan.
> > 
> > ______________________________________________________
> > Get Your Private, Free Email at http://www.hotmail.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
> 
> 
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.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


Current Thread