Thanks for the quick reply.
 
Couldn't this be added to xerces - it must be a relatively easy thing to do. Seems a shame to have to parse the same schema twice.
 
I'm writing a SchemaWriter as I'm using xerces as the basis of  a schema editor. So far, so good except for the namespace prefix. XSDHandler creates the SchemaGrammar and also picks up the prefix.
 
Perhaps I should do a local build and make the fix?
 
Nick
----- Original Message -----
From: Jeff Greif
Sent: Thursday, July 31, 2003 7:49 PM
Subject: Re: Getting the namespace prefix

The namespace prefix is not a part of the PSVI (post schema validation infoset) which is represented by the XSModel.  I think you'd probably have to do a separate parse of the schema file and rummage in the SAX events or the DOM to find the prefix.
 
Jeff
 
----- Original Message -----
Sent: Thursday, July 31, 2003 11:38 AM
Subject: Getting the namespace prefix

I'm having difficulty in trying to get the namespace prefix.
 
When I get the SchemaGrammar and recurse down through the model, when I get to the simpleTypes (eg "xs:string") I can recover both the name and the namespace of the simpleType, but I can't work out how to recover the namespace prefix.
 
 

Reply via email to