logo       

Re: schemabuilder with Xerces: msg#00008

Subject: Re: schemabuilder with Xerces
Hi, 

> > In any case, the code works now, but there is still a problem: the 
> > inheritance ("extension" for complexTypes) does not work correctly, 
> > because Xerces behaves differently than Castor about compatible types 
(it 
> > includes base types in the model group). This may require a little 
more 
> > time to solve, and in particular because it didn't work before 
neither: I 
> > think the behavior of extensions should be refactored a little.
> you're talking about datatype extensions, right?
Yes, the extensions on complex types. The ones on simple types seem to 
work correctly. 

> right, we changed this according to the spec which says:
> 4.2.1 The xforms-model-construct Event (under 4.c.):
> "If the node already contains a model item property of the same name, 
> XForms processing for this containing document halts with an exception"
> we interpret this as follows:
> each instance data item may have model item properties such as readonly, 

> required etc. for every single instance data item there's only one model 

> item property of a specific type allowed (only one required property, 
> only one readonly property,...).

OK, no problem, we'll just have to see how to implement extensions to take 
this into account. 

> > - there was also a problem with the switch introduced for an 
extension, 
> > which didn't work (I don't know why: perhaps an event was missing ?)
> which switch do you mean here?
When complex types "b" and "c" extended a complex type "a", for example, 
you had the choice to supply the element of type "a" between: 
- giving the values only in a
- giving the values in a + the values in b
- giving the values in a + the values in c
This was done with a select1, to select between the types a, b and c, 
which changed a switch containing the controls. These controls referred to 
different binds pointing on the same nodes. 

> thank you for this great work.
> please just checkin your code. i've created a tag named 'T-0-9-4-castor' 

> which allows us to revert to the current castor version. maybe in the 
> meantime someone likes to look after the new code.
OK, I'll commit it, but I wanted to do this yesterday and I noticed a 
problem in a repeat, which wasn't shown by the "purchaseOrder-repeats" 
test. I'll just have to debug this before committing...

Sophie




joern turner <joern.turner-S0/GAf8tV78@xxxxxxxxxxxxxxxx> 
Sent by: chiba-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
02/03/2004 23:08

To
sophie.ramel-bqDqoxiz9wg@xxxxxxxxxxxxxxxx
cc
Chiba <chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx>
Subject
Re: [Chiba-developer] schemabuilder with Xerces






hello Sophie,

sophie.ramel-bqDqoxiz9wg@xxxxxxxxxxxxxxxx wrote:

> Hi, 
> 
> I've finally finished to adapt the schemabuilder tool to the Xerces 
schema 
> API: it took longer than I had thought... writing the code was OK, but 
> debugging it was another matter !
> I must say I'm not 100% happy with the Xerces API: there are some 
strange 
> behaviour for some methods, some processing that is not made in the 
> library and that has to be made directly in the code (for example to get 

> the occurance of an element, if it is only defined on the complex type 
> particle and not on the element declaration), some string parameters 
whose 
> order changed in methods between 2.6.0 and 2.6.1 (see 
> XSModel.getElementDeclaration and XSModel.getTypeDefinition : name and 
> namespace parameters are switched between versions !), ...
sorry for that. it looked quite good at first sight but sure it's 
another thing to really work with a lib.

seems that the API is not as stable as the release notes implies and 
they're still refactoring things. so, we'll have to live with these 
changes for a while.

> 
> In any case, the code works now, but there is still a problem: the 
> inheritance ("extension" for complexTypes) does not work correctly, 
> because Xerces behaves differently than Castor about compatible types 
(it 
> includes base types in the model group). This may require a little more 
> time to solve, and in particular because it didn't work before neither: 
I 
> think the behavior of extensions should be refactored a little.
you're talking about datatype extensions, right?

> For basicTest.xsd, which contains extensions, even if the test case was 
> corresponding to the expected xforms, this xforms didn't work in chiba, 
> for different reasons: 
> - when there is an extension, the bind element used in different 
> possibilities in the introduced switch were repeated (we got different 
> binds for the same elements). This may have worked in a previous version 

> of chiba, but in this version it doesn't work (we get an error: 
"property 
> 'type' already present at model item")
right, we changed this according to the spec which says:

4.2.1 The xforms-model-construct Event (under 4.c.):
"If the node already contains a model item property of the same name, 
XForms processing for this containing document halts with an exception"

we interpret this as follows:
each instance data item may have model item properties such as readonly, 
required etc. for every single instance data item there's only one model 
item property of a specific type allowed (only one required property, 
only one readonly property,...).

> - there was also a problem with the switch introduced for an extension, 
> which didn't work (I don't know why: perhaps an event was missing ?)
which switch do you mean here?

> - to find which extension was chosen, an attribute "xsi_type" was used, 
> but because it's created, it was never in the instance document, so we 
get 
> an error like this: "No value for xpath: /test/a/@xsi_type". 
> So I made another test case, "basicTest-noInheritence", based on 
basicTest 
> but without extensions, to test that all other functionnalities work.
> 
> So I finally come to my question: do you thing I should commit my work 
> now, or wait before inheritance works correctly before commiting? 
(because 
> I'm not sure I'll have time to work on inheritance right now, and I'm on 

> holiday next week...). 
thank you for this great work.

please just checkin your code. i've created a tag named 'T-0-9-4-castor' 
which allows us to revert to the current castor version. maybe in the 
meantime someone likes to look after the new code.

wish you a very nice holiday.

best,

Joern



> Thanks, 
> 
> Sophie
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Chiba-developer mailing list
> Chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/chiba-developer
> 



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Chiba-developer mailing list
Chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/chiba-developer





-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe