Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [xsd-dev] Help on Extending XSD classes



Manohar,

I would much prefer that you ask questions using the newsgroup rather than
using the mailing list.

Since XSDSchemaImpl implements getElementDeclarations like this:

   public EList getElementDeclarations()
   {
     if (elementDeclarations == null)
     {
       elementDeclarations = new EObjectEList(XSDElementDeclaration.class,
   this, XSDPackage.XSD_SCHEMA__ELEMENT_DECLARATIONS);
     }
     return elementDeclarations;
   }

It's not possible for this to return null as you say it does.  Furthermore,
since the population of this list happens automatically as things are added
to XSDSchema.contents and as imports and includes are resolved, the fact
that none of this is working really means I would be asking you the
question of what have you done to make this stop working.  I think your
questions need to be a little more focused in order for me to be able to
help.  Please ask them using the newsgroup.

Note that the XSD model was not designed with the intent that it be
extended and that the schema spec actually blocks (blockDefault="#all")
extension in the schema for schema grammar.


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




                                                                           
             "Manohar Babu"                                                
             <dmbabu@xxxxxxxxx                                             
             >                                                          To 
             Sent by:                  xsd-dev@xxxxxxxxxxx                 
             xsd-dev-admin@ecl                                          cc 
             ipse.org                                                      
                                                                   Subject 
                                       Re: [xsd-dev] Help on Extending XSD 
             04/12/2004 08:51          classes                             
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
                  xsd-dev                                                  
                                                                           
                                                                           




Hi Merks,

Thank you so mcuh for the quick reply you have given.
I will eloborate till the extent I have gone thru. May be if possible pls
extend some help on that.

The various steps I followed are:

1. ResourceSet resourceSet = new WBResourceSetImpl();
here WBResourceSetImpl is my own class
2.WBXSDResourceImpl xsdMainResource =
(WBXSDResourceImpl)resourceSet.createResource(uri);
here WBXSDResourceImpl is my own class
3.WBXSDResourceImpl xsdResource = (WBXSDResourceImpl)resource;
4.WBXSDSchemaImpl xsdSchema = (WBXSDSchemaImpl)xsdResource.getSchema();
here WBXSDSchemaImpl is my own class.
and some more classes I could write extending the Eclipse XSD frame work.

so now my problem is ,when I try to say schema.getElementDeclarations() ,
its returning me null. that means my schema object is not completely filled
in, that is what I understood. Inorder to get the elements and attibutes
from the xml schema. what all classes I need to override.

Can you please reply to my doubt, I would be thank ful to you.

thanks
Manohar

--

--------- Original Message ---------

DATE: Mon, 12 Apr 2004 06:32:58
From: Ed Merks <merks@xxxxxxxxxx>
To: xsd-dev@xxxxxxxxxxx
Cc:

>
>
>
>
>Manohar,
>
>It's best to ask questions in the newsgroup.  The model is constructed
>using methods internal to the model, like
>XSDConcreteComponent.reconcileContents.  If you want to populate
additional
>things, you'll want to override methods like that...
>
>
>Ed Merks/Toronto/IBM@IBMCA
>mailto: merks@xxxxxxxxxx
>905-413-3265  (t/l 969)
>
>
>
>
>

>             "Manohar Babu"

>             <dmbabu@xxxxxxxxx

>             >                                                          To

>             Sent by:                  xsd-dev@xxxxxxxxxxx

>             xsd-dev-admin@ecl                                          cc

>             ipse.org

>                                                                   Subject

>                                       [xsd-dev] Help on Extending XSD

>             04/12/2004 05:51          classes

>             AM

>

>

>             Please respond to

>                  xsd-dev

>

>

>
>
>
>
>
>Hi,
>I am working on xsd , trying to extend the xsd classes and write my own
>classes to incorporate some more functionality. I could go till the extent
>of getting a my own object instance of XSDSchema. Now further going foward
>to extend the ElementDecl and AttributeDecl classes , I am not able to
move
>forward. Can anybody help me in how to go abt after the schema instance is
>created (for ex: how to fill in the schema object with the element
>declarations and stuff like this)
>
>thanks in advance
>Manohar
>
>
>____________________________________________________________
>Find what you are looking for with the Lycos Yellow Pages
>http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10

>
>_______________________________________________
>xsd-dev mailing list
>xsd-dev@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/xsd-dev
>
>
>_______________________________________________
>xsd-dev mailing list
>xsd-dev@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/xsd-dev
>



____________________________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10

_______________________________________________
xsd-dev mailing list
xsd-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/xsd-dev




Back to the top