Subject:command line StylusValidator can not find schema Author:Rosilyn Seay Date:17 Mar 2009 02:26 PM
when attempting to validate using command line and forcing a schema using command:
StylusValidator -schema myfile.xsd myfile.xml
I receive the error "document has no schema and cannot be validated". The schema exists. The xml validates against it if I use the GUI. If I do a directory on the schema file, exactly as it is in command line, the file shows up. However, apparently the validator can not find it.
Subject:command line StylusValidator can not find schema Author:(Deleted User) Date:02 Apr 2009 02:44 AM
Hi Rosilyn,
it could be that the message is misleading; I cannot say it for sure without seeing the actual XML file, but I am inclined to think that the message it should have been printed is "your XML has validation errors".
Could you attach your sample files (or send them to stylus-field-report at progress.com) so that we can investigate further?
Subject:command line StylusValidator can not find schema Author:Eng Admin Date:12 Oct 2010 06:40 PM
I am also having a similar issue and since it appears that this issue did not receive response from the original poster I thought I would just add onto the same string.
From what I can tell, even when I try to force a validation against a schema file the program only wants to utilize the schema listed on line 2 of the XML (modified sample shown below.
First 2 lines of XML:
<?xml version="1.0"?>
<import xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="\\networkshare\schemas\listedschema.xsd">
Command Line Used:
stylusvalidator.exe -schema:\\networkshare2\otherschemas\forcedschema.xsd \\networkshare3\xmls\samplexml.xml
Error Received:
File file://\\\\networkshare3\xmls\samplexml.xml (ln 2, Col 123): Cannot open listedschema.xsd
Seems like it still wants to validate against the schema listed in the XML, not against the schema listed in the command.