You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: module-development/file-based/CLAUDE.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,6 +263,53 @@ ORDER BY DisplayName
263
263
</query>
264
264
```
265
265
266
+
## XML Schema Reference
267
+
268
+
LabKey modules use various XML configuration files with specific schemas. When creating these files, always consult the official schema documentation for complete element and attribute references.
Real-world examples of these XML files can be found in the LabKey testAutomation modules: https://github.com/LabKey/testAutomation/tree/develop/modules
289
+
290
+
Browse specific modules for examples:
291
+
- **simpletest**: Basic queries, views, web parts, folder types
292
+
- **scriptpad**: Reports and R scripts
293
+
- **pipelinetest2**: Pipeline tasks and definitions
294
+
- **editableModule**: Editable grid queries
295
+
- **linkedschematest**: Schema templates and linked queries
296
+
297
+
### Key Points
298
+
299
+
- **Query metadata** (`.query.xml`) often uses two namespaces: the primary `query` namespace for the root element and the `data/xml` namespace for the `<tables>` element
300
+
- **Report descriptors** (`.report.xml`) use two namespaces: `http://labkey.org/query/xml` for the main descriptor and `http://labkey.org/data/xml/reportProps` (prefix `rep:`) for properties
301
+
- **Domain templates** (`.template.xml`) use `xsi:type` to specify template types: `ListTemplateType`, `DataClassTemplateType`, `SampleSetTemplateType`
302
+
- **Pipeline tasks** (`.task.xml`) use `xsi:type` to specify task types: `ScriptTaskType`, `JavaTaskType`, `CommandTaskType`
303
+
- **View files** (`.view.xml`) are used when you need to declare JavaScript/CSS dependencies; simple web parts only need `.webpart.xml`
304
+
305
+
### Typical Workflow
306
+
307
+
1. Create the primary resource file (`.sql`, `.html`, `.r`, etc.)
308
+
2. Add the corresponding XML configuration file if needed
309
+
3. Reference the online schema documentation for available elements and attributes
310
+
4. Look at examples in the testAutomation modules on GitHub for real patterns
311
+
5. Test your changes (most XML updates don't require server restart)
0 commit comments