Skip to content

Commit

Permalink
Deal better with namespace undeclaration
Browse files Browse the repository at this point in the history
  • Loading branch information
jclark committed Mar 16, 2020
1 parent a73b9cd commit a4854d8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -1048,9 +1048,10 @@ <h5>XML namespaces</h5>
<code>xml</code>. If there is already a namespace declaration in the [namespace
attributes] that declares a prefix with that namespace name, then that prefix is
used. Otherwise if there is a namespace declaration in the in-scope namespaces
that declares a prefix with that namespace and it is not redeclared by the
[namespace attributes], then that prefix is used. Otherwise generate a prefix
and add an AII to the [namespace attributes] to declare it.</li>
that declares a prefix with that namespace and it is not redeclared or
undeclared by the [namespace attributes], then that prefix is used. Otherwise
generate a prefix and add an AII to the [namespace attributes] to declare
it.</li>
<li>If the EII has no [namespace name] property, but a default namespace
declaration is in scope, then an <code>xmlns=""</code> AII is added to the
[namespace attributes] property to undeclare the default namespace.</li>
Expand All @@ -1066,8 +1067,8 @@ <h5>XML namespaces</h5>
already declared as N; if there is one, set the [prefix] property of the EII to
P;</li>
<li>otherwise, if the [namespace attributes] property does not contain a default
namespace declaration, generate a default namespace declaration for N and add it
to the [namespace attributes] property;</li>
namespace declaration or undeclaration, generate a default namespace declaration
for N and add it to the [namespace attributes] property;</li>
<li>otherwise, generate a new prefix P, set the [prefix] property of the EII to
P, and add an AII to the [namespace attributes] to declare it.</li>
</ol>
Expand Down

0 comments on commit a4854d8

Please sign in to comment.