mbeckerle commented on code in PR #935:
URL: https://github.com/apache/daffodil-vscode/pull/935#discussion_r1449750473


##########
package.json:
##########
@@ -340,6 +340,16 @@
                 "description": "Absolute path to the input data file.",
                 "default": "${command:AskForDataName}"
               },
+              "rootName": {

Review Comment:
   > That makes sense to me. That might be something I could add into this PR, 
@mbeckerle how would you fell about this?
   
   Well these 3 things are, worst case, needed to specify the right root 
element. 
   
   - path is a URI resolvable via the classpath
   - rootName is optional, and defalts to the first element declaration in the 
schema file identified by the path, if it is not specified (or is null), that 
is if such global element declaration exists. It may not. The root element can 
actually be defined anywhere in the schema. 
   - rootNamespace is only meaningful if rootName is provided, and it is 
optional unless it is needed because the schema, transitively, has multiple 
global element declarations matching rootName. Usually it is not needed, 
because just the rootName is unambiguous, but it is needed in case people are 
lazy and call their root element "root" or "main" or something very generic 
like that.
    
   I think a DAP service that, given the path, provides the possibilities for 
name (w/ associated namespace if ambiguous) is needed to provide a decent UI 
picker/chooser for this. 
   
   But note also, if a DFDL schema gets compiled to binary form, the decision 
about which root element is being used is over, and is welded into that 
compiled schema. We definitely do need to work from compiled schemas because 
schema compilation times are *long* for these large DFDL schemas (5 minutes for 
the VMF schema which has 800 files and 180K lines of DFDL). 
   
   Short term, we can continue to depend on people just having to know the 
rootName + namespace when they are needed. 
   



-- 
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