19 January 2009

The value of attribute "..." associated with an element type "..." must not contain the '<' character.

A parameter was declared under the xsl as


I was trying to populate an attribute of a node in xsl, by using the above declared parameter value as


But this yielded the following error.

The value of attribute "attrName" associated with an element type "parentnode" must not contain the '<' character.


After trying lot of combinations/ways, I found out a way to do it and is

That is simply access the xsl:param as you access a xsl:variable.

Another way of doing it is first declare a variable whose value is the xsl:param value, then use this variable in the same way as did it in the above case


As you can see the second approach is not recommended over the first one.

Hope this helps!