You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Mathias Laguerie <ma...@softeam.fr> on 2002/09/10 18:34:13 UTC

XML Schema libraries

Hi all
I'm trying to manipulate XSD element.
So I execute this code to preparse my grammar.
	XMLInputSource is = new XMLInputSource(null, 
"file://C:/Projects/MixExist/data/test3.xsd", null);
	SymbolTable sym = new SymbolTable();
	XMLGrammarPreparser preparser = new XMLGrammarPreparser(sym);
	XMLGrammarPoolImpl grammarPool = new XMLGrammarPoolImpl();
	preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
	preparser.setProperty(GRAMMAR_POOL, grammarPool);
	preparser.setFeature(NAMESPACES_FEATURE_ID, true);
	preparser.setFeature(VALIDATION_FEATURE_ID, true);
	preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
	preparser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, false);
	SchemaGrammar xsd = 
(SchemaGrammar)preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, is);

It 's work.
but when I want to access in XSD document by execute this line :
	XSElementDecl root2 = xsd.getElementDecl("UserCreationModification");
I get this execption during compilation :
	C:\Projects\MixExist\src\SchemaTester.java:57: cannot resolve symbol
	symbol  : method getElementDecl  (java.lang.String)
	location: class org.apache.xerces.impl.xs.SchemaGrammar
I'm suprised because SchemaGrammar object has the operation public 
XSElementDecl  getElementDecl  (java.lang.String)
any idea ?
Mathias
		


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