xsl-list
[Top] [All Lists]

RE: [xsl] Problems with tag <img src = > -- XSLT

2006-08-04 12:57:33
You just want 

<img src="{(_at_)src}"/>

You could probably replace your whole template with

<xsl:template match="a/img | p/img | td/img">
  <xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="img"/>

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Luana Knoff [mailto:lua(_dot_)knoff(_at_)gmail(_dot_)com] 
Sent: 04 August 2006 20:23
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Problems with tag <img src = > -- XSLT

Hi all,

I have a doubt using XSLT. I made a stylesheet to transform a 
XHTML document into WML, but now I would like to let the 
images (.JPG and
others) in my WML to make some others test, but I am not able 
to do it.

I need: <img src="IMG_arquivos/site.jpg" />

But my transformations just let the "IMG_arquivos/site.jpg", 
like a text. How can I put the

tag <img src = > ?

My code is:

<xsl:template match="img">                                    
                      
        <xsl:choose>
          <xsl:when test="parent::a or parent::p or parent::td">
              <xsl:value-of select="@src"/>   
<!--there is something to put here?-->
          </xsl:when>
          <xsl:otherwise>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template> -->

Is it possible?
Any hints are welcome.

Luana

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>