rt320 commented on code in PR #292:
URL: https://github.com/apache/daffodil-vscode/pull/292#discussion_r970739358


##########
src/language/providers/intellisense/elementItems.ts:
##########
@@ -29,84 +29,84 @@ export const elementCompletion = (definedVariables, 
dfdlFormatString) => {
       },
       {
         item: 'xs:element name',
-        snippetString: '<xs:element name="$1"$0',
+        snippetString: '<' + nsPrefix + 'element name="$1"$0',
         markdownString: 'A new xs element',
       },
       {
         item: 'xs:element ref',
-        snippetString: '<xs:element ref="$1"$0',
+        snippetString: '<' + nsPrefix + 'element ref="$1"$0',
         markdownString: 'A new dfdl reference to an item',
       },
       {
         item: 'xs:group name',
-        snippetString: '<xs:group name = "$1">\n\t$0\n</xs:group>',
+        snippetString: '<' + nsPrefix + 'group name = "$1">\n\t$0\n</' + 
nsPrefix + 'group>',
       },
       {
         item: 'xs:group ref',
-        snippetString: '<xs:group ref="$1"$0',
+        snippetString: '<' + nsPrefix + 'group ref="$1"$0',
         markdownString: 'A new dfdl reference to an item',
       },
       {
         item: 'dfdl:assert',
-        snippetString: '<xs:annotation>\n\t<xs:appinfo 
source="http://www.ogf.org/dfdl/";>\n\t\t<dfdl:assert>"<$1>"</dfdl:assert>\n\t</xs:appinfo>\n</xs:annotation>$0',
+        snippetString: '<' + nsPrefix + 'annotation>\n\t<' + nsPrefix + 
'appinfo 
source="http://www.ogf.org/dfdl/";>\n\t\t<dfdl:assert>"<$1>"</dfdl:assert>\n\t</'
 + nsPrefix + 'appinfo>\n</' + nsPrefix + 'annotation>$0',
         markdownString: 'dfdl assertion test',
       },
       {
         item: 'dfdL:discriminator',
-        snippetString: '<xs:annotation>\n\t<xs:appinfo 
source="http://www.ogf.org/dfdl/";>\n\t\t<dfdl:discriminator 
test="{$1}"/>\n\t</xs:appinfo>\n</xs:annotation>$0',
+        snippetString: '<' + nsPrefix + 'annotation>\n\t<' + nsPrefix + 
'appinfo source="http://www.ogf.org/dfdl/";>\n\t\t<dfdl:discriminator 
test="{$1}"/>\n\t</' + nsPrefix + 'appinfo>\n</' + nsPrefix + 'annotation>$0',
         markdownString: 'dfdl discriminator test',
       },
       {
         item: 'dfdl:hiddenGroupRef',
-        snippetString: '<xs:sequence dfdl:hiddenGroupRef="$1"/>\n$0',
+        snippetString: '<' + nsPrefix + 'sequence 
dfdl:hiddenGroupRef="$1"/>\n$0',
       },
       {
         item: 'dfdl:format',
         snippetString: dfdlFormatString,
       },
       {
         item: 'xs:annotation',
-        snippetString: '<xs:annotation>\n\t<xs:appinfo 
source="http://www.ogf.org/dfdl/";>\n\t\t$0\n\t</xs:appinfo>\n</xs:annotation>',
+        snippetString: '<' + nsPrefix + 'annotation>\n\t<' + nsPrefix + 
'appinfo source="http://www.ogf.org/dfdl/";>\n\t\t$0\n\t</' + nsPrefix + 
'appinfo>\n</' + nsPrefix + 'annotation>',
       },
       {
         item: 'xs:appinfo',
-        snippetString: '<xs:annotation>\n\t<xs:appinfo 
source="http://www.ogf.org/dfdl/";>\n\t\t$0\n\t</xs:appinfo>\n</xs:annotation>',
+        snippetString: '<' + nsPrefix + 'annotation>\n\t<' + nsPrefix + 
'appinfo source="http://www.ogf.org/dfdl/";>\n\t\t$0\n\t</' + nsPrefix + 
'appinfo>\n</' + nsPrefix + 'annotation>',
       },
       {
         item: 'xs:complexType',
-        snippetString: '<xs:complexType>\n\t$0\n</xs:complexType>',
+        snippetString: '<' + nsPrefix + 'complexType>\n\t$0\n</' + nsPrefix + 
'complexType>',
         markdownString: 'Starts a complex type definition',
       },
       {
         item: 'xs:complexType name=',
-        snippetString: '<xs:complexType Name="$1">\n\t$0\n</xs:complexType>',
+        snippetString: '<' + nsPrefix + 'complexType Name="$1">\n\t$0\n</' + 
nsPrefix + 'complexType>',
         markdownString: 'Starts a complex type definition',
       },
       {
         item: 'xs:simpleType',
-        snippetString: '<xs:simpleType>\n\t$0\n</xs:simpleType>',
+        snippetString: '<' + nsPrefix + 'simpleType>\n\t$0\n</' + nsPrefix + 
'simpleType>',
         markdownString: 'Starts a simple type definition',
       },
       {
         item: 'xs:simpleType name=',
-        snippetString: '<xs:simpleType Name="$1"$0',
+        snippetString: '<' + nsPrefix + 'simpleType Name="$1"$0',
         markdownString: 'Starts a simple type definition',
       },
       {
         item: 'xs:sequence',
-        snippetString: '<xs:sequence',
+        snippetString: '<' + nsPrefix + 'sequence',
       },
       {
         item: 'xs:choice',
-        snippetString: '<xs:choice$1>\n\t$0\n</xs:choice>',
+        snippetString: '<' + nsPrefix + 'choice',

Review Comment:
   The change to not close the choice tag was done as part #283. It is in the 
code in current "main" branch"  This change removes the hardcode "xs:".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to