Search

Hey guys,

So I'm using Markdown but let's say I wanted all my h3's to have class="alt".

I want xslt to do this for me, but I can't seem to figure out the best way to do this.

Right now I'm consolidating a couple of nodes into a variable: seen here because the content consists of three possible sources:

  1. Straight from the particular-page.xsl, via a <xsl:template name="page-content"></xsl:template>
  2. Section body content which is like the folder content summary
  3. Page body content which is a typical page inside a folder

Basically, I expected to work with variable $content from now on.

Now I'm just stuck updating the nodes from the node-set with the right attributes and doing a <xsl:copy-of select="$content" />

If it's not clear, I'd like to go from this - to this

Keep in mind, though, that I've added some extra stuff that I would add later on as soon as I learn how to update the node set correctly.

Nevermind, ya'll.

Chaotic Pattern to the rescue. :)

I'm still curious of how to do it via a node-set, however. If anyone knows.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details