RE: [xsl] illegal xhtml attributes?

Subject: RE: [xsl] illegal xhtml attributes?
From: "Dominic Tocci" <dominic.tocci@xxxxxxxxxxx>
Date: Mon, 2 Apr 2001 09:20:33 -0400
Hey thanks for the reply.  I've dumbed down the xsl to the point where it's
small enough and I still get the warning.  Here is the offending xsl.  The
xml is in the attached message text below.  I found when I take out the 5
lines beginning with "<xsl:if test="$reset='true'">", I don't get the
warning during my transformation anymore.  Maybe I'm being dense but I don't
see what's wrong with the code:

<xsl:stylesheet xmlns:xsl="";
  <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  <xsl:template match="xbutton">
    <xsl:variable name="imagewidth" select="./image/@width"/>
    <xsl:variable name="imageheight" select="./image/@height"/>
    <xsl:variable name="imagealt" select="./image/@alt"/>
    <out:variable name="image">
      <xsl:apply-templates select="./image"/>
    <xsl:variable name="reset">
        <out:variable name="action">
          <xsl:apply-templates select="./action"/>
                  <xsl:attribute name="href">
select="count(./preceding::*[name(.)='form']) +
              <img border="0">
                <xsl:attribute name="width">
                  <xsl:value-of select="$imagewidth"/>
                <xsl:attribute name="height">
                  <xsl:value-of select="$imageheight"/>
                <xsl:attribute name="alt">
                  <xsl:value-of select="$imagealt"/>
                <out:attribute name="src">
                  <out:value-of select="$image"/>
                <xsl:if test="$reset='true'">
                  <xsl:attribute name="alt">
                    <xsl:value-of select="'Reset'"/>

Thanks in advance for your help,

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of cutlass
> Sent: Sunday, April 01, 2001 12:19 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] illegal xhtml attributes?
> > Hi,
> >
> > I'm perplexed.  I have xml code which includes some xhtml code.
>  When I try
> > to perform an xslt transformation on it, I get the following warning:
> nothing wrong with xml
> >
> > XSL Warning: Illegal attribute name: alt
> >
> > the xml code looks like this:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xbutton>
> >   <image height="22" width="45" alt="Reset">images/gray.gif</image>
> >   <clear/>
> > </xbutton>
> >
> > What's strange is that there is no adverse effect on my output, and the
> > error message tends to be intermittent.  For example, this code does not
> > generate the same warning:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xbutton>
> >   <image height="22" width="45" alt="Reset">images/gray.gif</image>
> > </xbutton>
> will help but need some example xsl.
> cheers, jim fuller
>  XSL-List info and archive:

 XSL-List info and archive:

Current Thread