@@ -527,7 +527,26 @@ <h2>Serializing</h2>
527
527
< li > If the value of < var > skip end tag</ var > is < code > true</ code > , then return
528
528
the value of < var > markup</ var > and skip the remaining steps. The
529
529
< var > node</ var > is a leaf-node.
530
- < li > Append to < var > markup</ var > the result of running the
530
+ < li > If < var > ns</ var > is the < a title ="html-ns "> HTML namespace</ a > , and the < var > node</ var > 's
531
+ < code > < a title ="dom-element-localname " data-spec ="DOM4 " class ="externalDFN "> localName</ a > </ code >
532
+ matches the string "< code > template</ code > ", then this is a
533
+ < a title ="the-template-element " data-spec ="HTML5 " class ="externalDFN "> template</ a > element.
534
+ Append to < var > markup</ var > the result of running the
535
+ < a title ="concept-xml-serialization-algorithm "> XML serialization algorithm</ a > on the
536
+ < a title ="the-template-element " data-spec ="HTML5 " class ="externalDFN "> template</ a > element's
537
+ < a title ="template-contents " data-spec ="HTML5 " class ="externalDFN "> template contents</ a >
538
+ (a < a title ="interface-documentfragment " data-spec ="DOM4 " class ="externalDFN "> DocumentFragment</ a > ),
539
+ providing the value of < var > inherited ns</ var > for the
540
+ < a title ="concept-context-namespace "> context namespace</ a > ,
541
+ < var > map</ var > for the < a title ="concept-namespace-prefix-map "> namespace prefix map</ a > ,
542
+ < var > prefix index</ var > for the
543
+ < a title ="concept-generated-prefix "> generated namespace prefix index</ a > , and the value
544
+ of the < var > require well-formed</ var > flag. < span class ="note "> This allows
545
+ < a title ="template-contents " data-spec ="HTML5 " class ="externalDFN "> template content</ a > to
546
+ round-trip , given the rules for
547
+ < a title ="parsing-xhtml-documents " data-spec ="HTML5 " class ="externalDFN "> parsing XHTML documents</ a >
548
+ [[HTML5]].</ span >
549
+ < li > Otherwise, append to < var > markup</ var > the result of running the
531
550
< a title ="concept-xml-serialization-algorithm "> XML serialization algorithm</ a > on each
532
551
of < var > node</ var > 's
533
552
< a title ="concept-tree-child " data-spec ="DOM4 " class ="externalDFN "> children</ a > ,
0 commit comments