[template] fix node attribute with empty & zero values

Just noticed a little misbehaviour for node attributes that contains a `0` value or nothing:

```html
<input value="0" foo="" baz="1" />
```
parsed:

```
array(1) {
  ["@attrib"]=>
  array(3) {
    ["value"] => NULL
    ["foo"] => string(6) "" baz="
    [1]=> NULL
  }
}
```

expected (and fixed with this commit):
```
array(1) {
  ["@attrib"]=>
  array(3) {
    ["value"] => string(1) "0"
    ["foo"] => NULL
    ["baz"] => string(1) "1"
  }
}
```