In an XML file, you can use information from XSD files by including syntax like this:
<tables xmlns="http://labkey.org/data/xml">
In this example, the tableinfo.xsd will be loaded and when editing your XML, you will have options like statement completion: if you enter a '<' character (to start an element), you will see a popup of valid options to assist you:
If you are not seeing XSDs registered and available as expected, check to ensure that your IntelliJ is configured to find them in the correct location.
One symptom of an incorrect configuration is that the XML elements will be shown in IntelliJ in red. Select the path value and click 'Alt-Enter' for a menu of options. Choose Manually setup external resource.
In the popup, find and double click the relevant xsd file, in this example, tableinfo.xsd. Click OK. After you begin to edit your XML file, you will see the red alerts disappear and your XSD will be available.
You can also directly edit IntelliJ's settings as follows:
Learn more about how to manually setup external resources in IntelliJ here:
The following are some common LabKey XSD namespace URIs and their paths in the source tree.
URI | Location |
---|---|
http://cpas.fhcrc.org/exp/xml | <LABKEY_HOME>/server/modules/platform/api/schemas/expTypes.xsd |
http://labkey.org/data/xml | <LABKEY_HOME>/server/modules/platform/api/schemas/tableinfo.xsd |
http://labkey.org/data/xml/query | <LABKEY_HOME>/server/modules/platform/api/schemas/query.xsd |
http://labkey.org/data/xml/queryCustomView | <LABKEY_HOME>/server/modules/platform/api/schemas/queryCustomView.xsd |
http://labkey.org/moduleProperties/xml/ | <LABKEY_HOME>/server/modules/platform/api/schemas/module.xsd |
http://labkey.org/data/xml/webpart | <LABKEY_HOME>/server/modules/platform/api/schemas/webpart.xsd |
http://labkey.org/study/xml | <LABKEY_HOME>/server/modules/platform/api/schemas/datasets.xsd |
http://labkey.org/etl/xml | <LABKEY_HOME>/server/modules/dataintegration/schemas/etl.xsd |
previousnext |
expand allcollapse all |