Relative path to XSD
I'm reference an XSD in the project directory tree from an XML file. When I put the XSD in the same directory as the XML file, both "on-the-fly" validation and "full" validation work. If I put the XSD in a different directory than the XML file, "on-the-fly" validation continues to work, but the "full" validation gives me an error.
Here's the reference to the XSD in the XML file: xsi:noNamespaceSchemaLocation="../common/ctap.xsd"
The XML file is here: C:\Users\dafink\Documents\Project_files\version2\1.5.0.1\embeddedFavoriteSettingsFavorite.xml
The XSD file is here: C:\Users\dafink\Documents\Project_files\version2\common\ctap,xsd
Here's the error I get:
Error:External resource file:///C:/Program%20Files%20(x86)/JetBrains/WebStorm%2011.0.3/jre/jre/common/ctap.xsd is not registered
C:\Users\dafink\Documents\Project_files\version2\1.5.0.1\embeddedFavoriteSettingsFavorite.xml
Error:Premature end of file.
What am I doing wrong?
Please sign in to leave a comment.
seems relative paths in xsi:noNamespaceSchemaLocation are resolved relative to WebStorm working directory rather than current file path. Please follow https://youtrack.jetbrains.com/issue/IDEA-141538 for updates
The example that he gave there appears to work now (where the XML and XSD files are in the same directory). The problem occurs if they are in different directories.