Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [xsd-dev] Problem with xsdSchema.getSchemaForSchema()

George,

It sounds like probably the xsd.resources.jar isn't on your CLASSPATH;
that's were the XMLSchema.xsd is cached.


Ed Merks/Toronto/IBM@IBMCA
mailto: merks@xxxxxxxxxx
905-413-3265  (t/l 969)




                                                                                                                                    
                      "George Peter"                                                                                                
                      <george.peter@wip        To:       <xsd-dev@xxxxxxxxxxx>                                                      
                      ro.com>                  cc:                                                                                  
                      Sent by:                 Subject:  [xsd-dev] Problem with xsdSchema.getSchemaForSchema()                      
                      xsd-dev-admin@ecl                                                                                             
                      ipse.org                                                                                                      
                                                                                                                                    
                                                                                                                                    
                      01/20/2003 06:11                                                                                              
                      AM                                                                                                            
                      Please respond to                                                                                             
                      xsd-dev                                                                                                       
                                                                                                                                    
                                                                                                                                    



Hi ,
Iam trying to create a xsd document using the org.eclipse.xsd package
My code for creating xsdschema is given below
XSDFactory xsdFactory=XSDFactory.eINSTANCE;
XSDSchema xsdSchema =  xsdFactory.createXSDSchema();
xsdSchema.setTargetNamespace("http://www.example.com/PrototypicalSchema";);
xsdSchema.setElementFormDefault(XSDForm.QUALIFIED_LITERAL);
xsdSchema.setAttributeFormDefault(XSDForm.QUALIFIED_LITERAL);
xsdSchema.setSchemaForSchemaQNamePrefix("xsd");
Map qNamePrefixToNamespaceMap = xsdSchema.getQNamePrefixToNamespaceMap();
qNamePrefixToNamespaceMap.put("PTS", xsdSchema.getTargetNamespace());
qNamePrefixToNamespaceMap.put(xsdSchema.getSchemaForSchemaQNamePrefix(),
XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
qNamePrefixToNamespaceMap.put("EXT", "
http://www.example.com/SomeOtherSchema";);

After creating the xsdschema
If I use xsdSchema.getSchemaForSchema(); iam getting the below error

Error trace
java.lang.NullPointerException
at org.eclipse.emf.common.EMFPlugin.getBaseURL(EMFPlugin.java:89)
at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSchemaImpl.java:627)
at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSchemaImpl.java:2111)

Can any body help me in solving this problem.
My problem should be in setting the baseurl for EMFPlugin
george
 (See attached file: Wipro_Disclaimer.txt)

Attachment: Wipro_Disclaimer.txt
Description: Binary data


Back to the top