Author
Feature not recognized: - schema validation
Clarence Schabe
Greenhorn
Joined: May 12, 2004
Posts: 5
Hi, I am using the sample code provided by a link that was suggested in another posting: HowToValidateXmlAgainstAnySchema that is in the javaRanch wiki. but I am getting the error: Feature not recognized: http: //xml.org/sax/features/validation which was obviously in response to the line of code: parser.setFeature("http: //xml.org/sax/features/validation", true); Can someone help? Also, does anyone know how to reference a schema that is just on the local development machine - i.e. the line of code: parser.setProperty("http: //apache.org/xml/properties/schema/external-schemaLocation", "http://domain.com/mynamespace mySchema.xsd"); How do I point to my schema if it is only on my local development machine at say c:\myFolder\myXsd.xsd? Many Thanks!
Clarence Schabe
Greenhorn
Joined: May 12, 2004
Posts: 5
Hi - me again. Please ignore the first part of my question regarding feature not recognized - that was just a silly white space issue. But the second part of my question is still unanswered - how do I point to and .xsd that is just on my local machine - I tried to run the example with this code: parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", "_tst01.xsd"); where _txt01.xsd is at the level where the program is executing and not surprisingly I get the warning: [Warning] :-1:-1: SchemaLocation: schemaLocation value = '_tst01.xsd' must have even number of URI's. So again, how can I point to an .xsd on my local system?
Clarence Schabe
Greenhorn
Joined: May 12, 2004
Posts: 5
Answered my own question again - just had to use: parser.setProperty( "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", "_my.xsd"); instead
Swordfish
Greenhorn
Joined: Jun 13, 2005
Posts: 4
posted Jun 13, 2005 01:09:00
0
Hello Clarence, Thanks for your post that i managed to resolve the xml.org/sax... issue. But my code ... Now gives me other error ... Feature not recognized: <a href="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation</b rel="nofollow">" target="_blank">http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation[/B] Can u tell me what might be the issue ? I am using Xerces Impl 2.6.2 if the version matters ... Thanks in advance ... Shailendra
Originally posted by Clarence Schabe: Answered my own question again - just had to use: parser.setProperty( "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", "_my.xsd"); instead
subject: Feature not recognized: - schema validation