| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 27 | protected function normalizeElement(DOMElement $element) | ||
| 28 | 	{ | ||
| 29 | $if = $element->parentNode; | ||
| 30 | 		$test   = $if->getAttribute('test'); | ||
| 31 | 		$select = $element->getAttribute('select'); | ||
| 32 | |||
| 33 | // Ensure that the expressions match, and that they select one single attribute | ||
| 34 | 		if ($select !== $test || !preg_match('#^@[-\\w]+$#D', $select)) | ||
| 35 | 		{ | ||
| 36 | return; | ||
| 37 | } | ||
| 38 | |||
| 39 | // Replace the xsl:if element with the xsl:value-of element | ||
| 40 | $if->parentNode->replaceChild($if->removeChild($element), $if); | ||
| 41 | } | ||
| 42 | } |