Skip to content

Commit

Permalink
Make e.xml:space work
Browse files Browse the repository at this point in the history
Relates to #422 and #166.
  • Loading branch information
jclark committed Mar 13, 2020
1 parent 3a080d7 commit 9b5ff88
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -3632,7 +3632,9 @@ <h3>XML attribute access expression</h3>
class="grammar">xml-attribute-access-expr := xml-required-attribute-access-expr | xml-optional-attribute-access-expr
xml-required-attribute-access-expr := expression <code>.</code> xml-qualified-name
xml-optional-attribute-access-expr := expression <code>?.</code> xml-qualified-name
xml-qualified-name := xml-namespace-prefix <code>:</code> identifier
xml-qualified-name :=
xml-namespace-prefix <code>:</code> identifier
| qualified-identifier
</pre>

<p>
Expand All @@ -3644,16 +3646,21 @@ <h3>XML attribute access expression</h3>
subtype of xml.
</p>
<p>
The xml-namespace-prefix must be declared using an xmlns-decl-stmt. The
xml-qualified-name is expanded at compile-time into a string of the form
Normally, the prefix of the xml-qualified-name is an xml-namespace-prefix
declared using an xmlns-decl-stmt. In this case, the xml-qualified-name is
expanded at compile-time into a string of the form
</p>
<pre>
{<var>namespace-uri</var>}<var>local-name</var>
</pre>
<p>
where the namespace-uri comes from xml-namespace-uri specified in the
xmlns-decl-stmt, and the local-name comes from the identifier following the
colon.
colon. It is also allowed for the prefix of the xml-qualified-name to be
declared as a module-prefix, in which case the qualified-identifier must refer
to a module-const-decl of type string, and the expansion of the
xml-qualified-name is the value of the referenced constant; this allows for e.g.
<code>xml:lang</code> to work.
</p>
<p>
An xml-optional-attribute-access-expr is evaluated as follows. The expression is
Expand Down

0 comments on commit 9b5ff88

Please sign in to comment.