I want to replace href links from some html files. i have tried it with xslt, but php only supports 1.0.
For example: this:
<link rel="stylesheet" href="../../../ressources/css/multilevel- dropdown.css"
id="css-menu" />
into this:
<link rel="stylesheet" href="/../../ressources/css/multilevel-dropdown.css"
id="css-menu" />
XSLT 2.0 Example:
<xsl:template match="@href | @src">
<xsl:attribute name="{local-name(.)}"><xsl:value-of select="replace(., '../../', '****')"/></xsl:attribute>
</xsl:template>