Skip to content

Commit

Permalink
688 Semantics of local union types, enumeration types, and type alias…
Browse files Browse the repository at this point in the history
… names
  • Loading branch information
michaelhkay committed Sep 8, 2023
1 parent b954f32 commit 1932f32
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 50 deletions.
5 changes: 3 additions & 2 deletions specifications/grammar-40/xpath-grammar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2573,7 +2573,7 @@ ErrorVal ::= "$" VarName
<!-- [ start Types + Tests -->

<g:production name="SingleType" >
<g:ref name="SimpleTypeName"/>
<g:ref name="CastTarget"/>
<g:optional name="OptionalOccurrenceIndicator">
<g:string process-value="yes">?</g:string>
</g:optional>
Expand Down Expand Up @@ -2756,11 +2756,12 @@ ErrorVal ::= "$" VarName
<g:ref name="_QName_or_EQName" unfold="yes"/>
</g:production>

<g:production name="SimpleTypeName" if="xpath40 xquery40 xslt40-patterns">
<g:production name="CastTarget" if="xpath40 xquery40 xslt40-patterns">
<g:ref name="TypeName" not-if="xpath40 xquery40"/>
<g:choice if="xpath40 xquery40">
<g:ref name="TypeName"/>
<g:ref name="LocalUnionType"/>
<g:ref name="EnumerationType"/>
</g:choice>
</g:production>

Expand Down
13 changes: 13 additions & 0 deletions specifications/xquery-40/src/errors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,19 @@ It is a static error if the name of a feature in
will always return an empty sequence.</p>
</error>

<error spec="XQ" role="xquery" code="0146" class="ST" type="static">
<p>It is a <termref def="dt-static-error">static error</termref> if two or more item types
declared or imported by a <termref def="dt-module">module</termref> have equal <termref
def="dt-expanded-qname">expanded QNames</termref> (as defined by the <code>eq</code>
operator.)</p>
</error>

<error spec="XP" code="0147" class="ST" type="static">
<p>It is a <termref def="dt-static-error">static error</termref> if a type used as a member
type in a <nt def="LocalUnionType">LocalUnionType</nt> is not a
<termref def="dt-generalized-atomic-type"/>.</p>
</error>




Expand Down
Loading

0 comments on commit 1932f32

Please sign in to comment.