File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77use Dom ;
88use SimpleSAML \XML \Assert \Assert ;
9+ use SimpleSAML \XML \Attribute as XMLAttribute ;
910use SimpleSAML \XML \Constants as C ;
1011use SimpleSAML \XMLSchema \Exception \InvalidDOMElementException ;
1112use SimpleSAML \XMLSchema \Exception \InvalidValueTypeException ;
@@ -100,12 +101,14 @@ public function toXML(?Dom\Element $parent = null): Dom\Element
100101 $ e = $ this ->instantiateParentElement ($ parent );
101102
102103 if ($ this ->getTextContentType () === QNameValue::class) {
103- if (!$ e ->lookupPrefix ($ this ->getContent ()->getNamespaceURI ()->getValue ())) {
104- $ e -> setAttributeNS (
104+ if (!$ e ->lookupPrefix ($ this ->getContent ()->getNamespacePrefix ()->getValue ())) {
105+ $ namespace = new XMLAttribute (
105106 C::NS_XMLNS ,
106- 'xmlns: ' . $ this ->getContent ()->getNamespacePrefix ()->getValue (),
107- $ this ->getContent ()->getNamespaceURI ()->getValue (),
107+ 'xmlns ' ,
108+ $ this ->getContent ()->getNamespacePrefix ()->getValue (),
109+ $ this ->getContent ()->getNamespaceURI (),
108110 );
111+ $ namespace ->toXML ($ e );
109112 }
110113 }
111114
You can’t perform that action at this time.
0 commit comments