# Code Style

Rules which enforce a specific coding style.
Table of Contents

## UseConcatOnce

Since: PMD 5.0

Priority: Medium (3)

The XPath concat() functions accepts as many arguments as required so you can have "concat($a,’b’,$c)" rather than "concat($a,concat(‘b’,$c)".

This rule is defined by the following XPath expression:

    //node()[contains(substring-after(@select,'concat'),'concat')]

Example(s):

    <xsl:variable name="var" select="concat("Welcome",concat("to you ",$name))"/>
    <xsl:variable name="var" select="concat("Welcome","to you ",$name))">

Use this rule by referencing it:

    <rule ref="category/xsl/codestyle.xml/UseConcatOnce" />