You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/05/13 11:27:38 UTC

DO NOT REPLY [Bug 9021] New: - Failing to set external-schemaLocation

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9021>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9021

Failing to set external-schemaLocation

           Summary: Failing to set external-schemaLocation
           Product: Xerces2-J
           Version: 2.0.1
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: SAX
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: d.w.rees@bangor.ac.uk


I am trying to set schema validation from my app using the 
external-schemaLocation property, but I find that the parser is not using my 
schema. Any comments please ?
regards

Wynne Rees

The code is :
      try{
      parser.setFeature(NAMESPACES_FEATURE_ID, true);
      parser.setFeature("http://xml.org/sax/features/validation", true);
      parser.setFeature("http://apache.org/xml/features/validation/schema", 
true);
      
parser.setFeature("http://apache.org/xml/features/validation/schema-full-checkin
g", true);
      
parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocat
ion", "http://www.imsproject.org/xsd/imsep_rootv1p01  imsep_rootv1p01.xsd" );
      message(" the property is " + 
parser.getProperty("http://apache.org/xml/properties/schema/external-schemaLocat
ion"));
      }
      catch (SAXNotRecognizedException e) {
      System.out.println(parser  + " is not a schema-validating parser." + 
e.toString());
      }
      catch (SAXNotSupportedException e) {
      System.out.println(
      "Cannot change the schema right now. Try again later.");
      }

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org