We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b5f5f6 commit a4b09c7Copy full SHA for a4b09c7
src/TypedTextContentTrait.php
@@ -71,6 +71,17 @@ public function getContent(): ValueTypeInterface
71
public function toXML(?DOMElement $parent = null): DOMElement
72
{
73
$e = $this->instantiateParentElement($parent);
74
+
75
+ if ($this->getTextContentType() === QNameValue::class) {
76
+ if (!$e->lookupPrefix($this->getContent()->getNamespaceURI()->getValue())) {
77
+ $e->setAttributeNS(
78
+ 'http://www.w3.org/2000/xmlns/',
79
+ 'xmlns:' . $this->getContent()->getNamespacePrefix()->getValue(),
80
+ $this->getContent()->getNamespaceURI()->getValue(),
81
+ );
82
+ }
83
84
85
$e->textContent = strval($this->getContent());
86
87
return $e;
0 commit comments