5
5
xmlns : ct =" com.test"
6
6
version =" 3.0" >
7
7
8
- <?START type declarations with NO ERRORS ?>
8
+ <!-- Issues Tested:
9
+ 1. #144 https://github.com/DeltaXML/vscode-xslt-tokenizer/issues/144 (2 'regions')
10
+ 2. #146 https://github.com/DeltaXML/vscode-xslt-tokenizer/issues/146
11
+ 3. #147 https://github.com/DeltaXML/vscode-xslt-tokenizer/issues/147
12
+ 4 #148 https://github.com/DeltaXML/vscode-xslt-tokenizer/issues/148
13
+ -->
14
+
15
+ <?region ' as' attribute item types with NO ERRORS - ISSUE #144 (1/2) ?>
9
16
<xsl : variable name =" test1" as =" xs:integer" select =" count(22)" />
10
17
<xsl : variable name =" test2" as =" map(xs:integer, map(xs:string, array(xs:integer*)))?" select =" /*" />
11
18
<xsl : variable name =" test3" as =" xs:integer+" select =" 1" />
25
32
<xsl : variable name =" test17" as =" element(*, xs:integer)" select =" //*" />
26
33
<xsl : variable name =" test18" as =" element(as)" select =" /*" />
27
34
<xsl : variable name =" new" as =" function(*)" select =" function() {}" />
28
-
35
+
29
36
<xsl : function name =" fn:main" as =" item()*" >
30
37
<!-- no missing context-item error: -->
31
38
<xsl : param name =" test70" as =" xs:integer?" />
37
44
<xsl : variable name =" XP4test2" as =" union(xs:dateTime, xs:date, xs:time, xs:string)" select =" /*" />
38
45
<xsl : variable name =" XP4test3" as =" enum('NFC', 'NFD', 'NFKC', 'NFKD')" select =" /*" />
39
46
<xsl : variable name =" XP4test4" as =" type(ct:complex)" select =" /*" />
40
- <?END type declarations with NO ERRORS ?>
47
+ <?endregion ' as ' attribute item types with NO ERRORS ?>
41
48
42
49
43
- <?START type declarations WITH ERRORS ?>
50
+ <?region ' as ' attribute item types WITH ERRORS - ISSUE #144 (2/2) ?>
44
51
<xsl : variable name =" test1-error" as =" xs:intege" select =" count(22)" />
45
52
<xsl : variable name =" test1tvt-error" expand-text =" yes" as =" xs:intege" select =" count(22)" />
46
53
<xsl : variable name =" test2-error" as =" arrayx(xs:string)" select =" /*" />
71
78
<xsl : variable name =" test29-error" as =" element(?)" select =" ." />
72
79
<xsl : variable name =" test30-error" as =" element(..)?" select =" ." />
73
80
<xsl : variable name =" test31-error" as =" function()" select =" function() {}" />
74
- <xsl : variable name =" test32-error" as =" element()()" select =" function() {}" />
81
+ <xsl : variable name =" test32-error" as =" element()()" select =" function() {}" />
82
+ <?endregion ' as' attribute item types WITH ERRORS ?>
75
83
76
-
77
- <?END type declarations WITH ERRORS ?>
84
+ <?region chained map-lookup : NO ERRORS - ISSUE #146?>
85
+ <!-- there should be no linter error reported in the expression: $a?books?book -->
86
+ <xsl : variable name =" test1-spuriouserror" as =" xs:integer"
87
+ select =" let $a := map { 'books': map { 'book': 1}} return $a?books?book" />
88
+ <?endregion chained map-lookup : NO ERRORS ?>
89
+
90
+ <?region auto-complete list includes ' xs:anyAtomicType' - ISSUE #147?>
91
+ <!--
92
+ 1. the 'xs:' in the 'as' attribute should be marked as an error
93
+ 2. place the cursor inside the attribute, after 'xs:'
94
+ 3. type the character 'a' - the auto-complete list should popup and include 'xs:anyAtomicType'
95
+ 4. pressing <enter> should result in the type being updated and no error should be shown for the token
96
+ -->
97
+ <xsl : variable name =" test1-aclistincludes" as =" xs:" select =" 1" />
98
+ <?endregion auto-complete list includes ' xs:anyAtomicType' ?>
78
99
79
- <?START auto-complete test ?>
80
-
100
+ <?region auto-complete test - ISSUE #148?>
81
101
<!--
82
- 1. the 'as' attribute below should be marked with an error
102
+ 1. the 'as' attribute below should be marked with an error because it is empty
83
103
2. type within the 'as' attribute, the auto-complete list should be triggered and populated properly
84
104
-->
85
105
<xsl : variable name =" test1-autocomplate" as =" " select =" 'a string'" />
86
- <?END auto-complete test ?>
106
+ <?endregion auto-complete test ?>
87
107
88
108
</xsl : stylesheet >
0 commit comments