is it possible to change class on p or div with xslt?

You could do it simply like this :

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl=""

  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="@*|node()">
      <xsl:apply-templates select="@*|node()"/>
  <xsl:template match="@class[.='brodtext' and parent::P]">
      <xsl:attribute name="class">normal</xsl:attribute>

See it working here :

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top