Re: [PyWrapper-devel] [tdwg-tapir] Problem with Tapir and Outputmodel.
Status: Alpha
Brought to you by:
jatorre
From: <rp...@in...> - 2006-11-22 12:23:39
|
Hi again, I have updated my pywrapper to the last version in SVN. I have tried the last instructions of Markus and the pywrapper works if I use sequences instead of choices. In the file Log-Test1.xml the response is OK. In the file Log-Test2.xml, the pywrapper delete the nodes SpeciesRecordAuthors and SpeciesRecordCollaborators. I attach the file of two outputmodel (test1xml and test2.xml) and log (Log-Test1.xml and Log-Test2.xml) Thanks, Ram=F3n. D=F6ring, Markus escribi=F3: > Ram=F3n, > I am not sure what the reason is in your case. > I would imagine it has to do with the choices. If more than one branch = of a choce has mappings, Pywrapper tries to use the first one. In your ca= se that's the "Text" one, for example SpeciesRecordCollaborators/Text. Co= uld you try the model using sequences instead of chocies for a test? And = can you send us the debug.log file too for your requests? > > By the way, in your models mapping section you have mapped the model st= ructure to concepts defined by the same schema. We call this a canonical = model and you can make your life easier by using the automapping=3D"true"= flag in the mapping section. Just like the canonical abcd model: http://= rs.tdwg.org/tapir/cs/abcd2.06/model/abcd206.xml > > It maps every node of the schema to itself, using the namespace of the = schema to create qualified concept ids. > > Markus > > > =20 >> -----Original Message----- >> From: tdw...@li...=20 >> [mailto:tdw...@li...] On Behalf Of=20 >> Renato De Giovanni >> Sent: Freitag, 17. November 2006 19:14 >> To: tdw...@li... >> Subject: Re: [tdwg-tapir] Problem with Tapir and Outputmodel. >> >> >> Hi Ram=F3n, >> >> Two quick comments about the output model: >> >> * At a first glance I thought there were still two mandatory=20 >> elements: >> >> /Species/Record/RecordInformation/TargetAudience/Audience >> /Species/Record/RecordInformation/TargetAudience/Text >> >> But now I see that they are inside a choice of an optional element,=20 >> so in theory this should not be a problem. >> >> * It's curious that you mapped complex elements like Species, Record,=20 >> DataSource and others. Some are just grouping elements, others can be=20 >> seen as related to class instances. But as far as I know PyWrapper=20 >> doesn't handle this kind of mapping. >> >> Not sure if these things can help finding out the reasons for not=20 >> getting all expected results...=20 >> >> Regards, >> -- >> Renato >> >> On 17 Nov 2006 at 18:26, Ram=F3n P=E9rez wrote: >> >> =20 >>> Hi Markus and Renato, >>> >>> Thanks very much for yours response. I have tried your=20 >>> =20 >> suggestions but=20 >> =20 >>> i >>> don't resolve the problem. >>> >>> I have simplified the outputmodel and I have changed all=20 >>> =20 >> attribute to >> =20 >>> optional. >>> >>> With the outputmodelpcore2.xml the response is: >>> >>> <RecordInformation>=20 >>> <GlobalUniqueIdentifier>GUIDS-1</GlobalUniqueIdentifier> >>> <SpeciesRecordID>1--1.1</SpeciesRecordID> >>> <Language>latin1</Language> >>> <SpeciesRecordAuthors> >>> <SpeciesRecordAutor> >>> <Text>Alexander Rojas A.</Text> >>> </SpeciesRecordAutor> >>> <SpeciesRecordAutor> >>> <Text>Jose Gonzalez</Text> >>> </SpeciesRecordAutor> >>> </SpeciesRecordAuthors> >>> <SpeciesRecordCollaborators> >>> <SpeciesRecordCollaborator> >>> <FirstName>Francisco</FirstName> >>> <LastName>Morales</LastName> >>> </SpeciesRecordCollaborator> >>> </SpeciesRecordCollaborators>=20 >>> <PublicationDate>2006-10-09</PublicationDate> >>> <DateLastModified>2006-10-09</DateLastModified> >>> <TargetAudience> >>> <Text>1</Text> >>> </TargetAudience> >>> <Version>2.1</Version> >>> </RecordInformation> >>> >>> With the outputmodelpcore3.xml, the response is: >>> >>> >>> <RecordInformation>=20 >>> <GlobalUniqueIdentifier>GUIDS-1</GlobalUniqueIdentifier> >>> <SpeciesRecordID>1--1.1</SpeciesRecordID> >>> <Language>latin1</Language>=20 >>> <PublicationDate>2006-10-09</PublicationDate> >>> <DateLastModified>2006-10-09</DateLastModified> >>> <TargetAudience> >>> <Text>1</Text> >>> </TargetAudience> >>> <Version>2.1</Version> >>> </RecordInformation> >>> >>> The pywrapper deletes the SpeciesRecordAuthors and >>> SpeciesRecordCollaborators nodes. This is the important=20 >>> =20 >> information in=20 >> =20 >>> the diagnostic: >>> >>> <diagnostic time=3D"2006-11-17T18:24:45.32" level=3D"warn"> >>> The element >>> >>> =20 >> /Species/Record/RecordInformation/SpeciesRecordCollaborators/S >> peciesRecordCollaborator/Record=20 >> =20 >>> was limited 3 times. Some node instances have been lost. >>> </diagnostic> >>> - >>> <diagnostic time=3D"2006-11-17T18:24:45.32" level=3D"warn"> >>> The element=20 >>> >>> =20 >> /Species/Record/RecordInformation/SpeciesRecordAuthors/Species >> RecordAutor/Text=20 >> =20 >>> was limited 5 times. Some node instances have been lost. >>> </diagnostic> >>> >>> I attach a picture with the query result in the database. It doesn't >>> exist null values. >>> >>> Thanks for all, >>> >>> Ram=F3n. >>> =20 >> _______________________________________________ >> tdwg-tapir mailing list >> tdw...@li...=20 >> http://lists.tdwg.org/mailman/listinfo/tdwg-> tapir >> >> =20 > _______________________________________________ > tdwg-tapir mailing list > tdw...@li... > http://lists.tdwg.org/mailman/listinfo/tdwg-tapir > =20 |