Search

Edit: oh, the shame. It’s unbearable… Please ignore this question. Must. Get. More. Coffee

I’m getting more comfortable with xsl(t) but have a (noobish?) question regarding quoting attribute values.

Sometimes (not always it seems) I encounter xsl examples such as:

<xsl:param name="foo" select="'bar'" />

Note the ‘doubly-quoted’ bar value in the select attribute.

I could not find much googling why this is. I expect it has something to do with the way XSL handles these values internally, but I can’t really figure out why and in what scenario’s I should quote my attributes twice.

Also, it seems to work fine when I just use one set of quotes: select="bar"… Do I need to quote (param) select values twice? If so: does this only apply to param elements?

Unquoted select values are nodes and quoted values are strings.

One… Big… Doh!

:-)

Somebody please delete this thread ;-)

:o)

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