Skip to main content
Marcos_Suárez
Known Participant
September 15, 2013
Question

Change a attribute value with XSLT before importing an XML

  • September 15, 2013
  • 1 reply
  • 660 views

I need change the attribute value with XSLT before importing an XML

<table class="x" style="width="50pt">...

I have to divide by 200 the value of "width", and the result multiplied by 100:

(50/200) * 100

It's possible with a XLST?

This topic has been closed for replies.

1 reply

Green4ever
Inspiring
September 16, 2013

Hi,

Yes you can do this via XSLT.

You can try similar to the one below:

<table>

   <xsl:attribute name="width">

     <xsl:value-of select="((./width) div 200)*(100)" />

   </xsl:attribute>

</table>

I have not tested yet... Try it....

--------------

Green4ever

(I am back after long time)....

Marcos_Suárez
Known Participant
September 16, 2013

Thanks...

I'll try ...