| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | protected function normalizeAttribute(DOMAttr $attribute) |
||
| 25 | { |
||
| 26 | $element = $attribute->parentNode; |
||
| 27 | if (!$this->isXsl($element)) |
||
| 28 | { |
||
| 29 | // Replace XPath expressions in non-XSL elements |
||
| 30 | $this->replaceAVT($attribute); |
||
| 31 | } |
||
| 32 | elseif (in_array($attribute->nodeName, ['match', 'select', 'test'], true)) |
||
| 33 | { |
||
| 34 | // Replace the content of match, select and test attributes of an XSL element |
||
| 35 | $element->setAttribute( |
||
| 36 | $attribute->nodeName, |
||
| 37 | XPathHelper::minify($attribute->nodeValue) |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 63 | } |