[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: illegal xhtml attributes?

Subject: RE: illegal xhtml attributes?
From: "Dominic Tocci" <dominic.tocci@xxxxxxxxxxx>
Date: Mon, 2 Apr 2001 09:20:33 -0400
xsl attribute name alt
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="http://www.w3.org/1999/XSL/Transform"
                xmlns:out="output.xsl"
                version="1.0">
  <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"/>
    </out:variable>
    <xsl:variable name="reset">
          <xsl:text>true</xsl:text>
    </xsl:variable>
        <out:variable name="action">
          <xsl:apply-templates select="./action"/>
        </out:variable>
            <a>
                  <xsl:attribute name="href">
                    <xsl:text>javascript:document.forms[</xsl:text>
                      <xsl:value-of
select="count(./preceding::*[name(.)='form']) +
count(./preceding::*[name(.)='xform'])"/>
					<xsl:text>].reset();</xsl:text>
                  </xsl:attribute>
              <img border="0">
                <xsl:attribute name="width">
                  <xsl:value-of select="$imagewidth"/>
                </xsl:attribute>
                <xsl:attribute name="height">
                  <xsl:value-of select="$imageheight"/>
                </xsl:attribute>
                <xsl:attribute name="alt">
                  <xsl:value-of select="$imagealt"/>
                </xsl:attribute>
                <out:attribute name="src">
                  <out:value-of select="$image"/>
                </out:attribute>
                <xsl:if test="$reset='true'">
                  <xsl:attribute name="alt">
                    <xsl:value-of select="'Reset'"/>
                  </xsl:attribute>
                </xsl:if>
              </img>
            </a>
  </xsl:template>
</xsl:stylesheet>

Thanks in advance for your help,
Dominic

> -----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:  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:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.