[tdwg-tapir] Problem with Tapir and Outputmodel.

"Döring, Markus" m.doering at BGBM.org
Mon Nov 20 10:52:00 CET 2006


Ramón,
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 case that's the "Text" one, for example SpeciesRecordCollaborators/Text. Could 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 structure to concepts defined by the same schema. We call this a canonical model and you can make your life easier by using the automapping="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


> -----Original Message-----
> From: tdwg-tapir-bounces at lists.tdwg.org 
> [mailto:tdwg-tapir-bounces at lists.tdwg.org] On Behalf Of 
> Renato De Giovanni
> Sent: Freitag, 17. November 2006 19:14
> To: tdwg-tapir at lists.tdwg.org
> Subject: Re: [tdwg-tapir] Problem with Tapir and Outputmodel.
> 
> 
> Hi Ramón,
> 
> Two quick comments about the output model:
> 
> * At a first glance I thought there were still two mandatory 
> 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, 
> so in theory this should not be a problem.
> 
> * It's curious that you mapped complex elements like Species, Record, 
> DataSource and others. Some are just grouping elements, others can be 
> seen as related to class instances. But as far as I know PyWrapper 
> doesn't handle this kind of mapping.
> 
> Not sure if these things can help finding out the reasons for not 
> getting all expected results... 
> 
> Regards,
> --
> Renato
> 
> On 17 Nov 2006 at 18:26, Ramón Pérez wrote:
> 
> > Hi Markus and Renato,
> > 
> > Thanks very much for yours response. I have tried your 
> suggestions but 
> > i
> > don't resolve the problem.
> > 
> > I have simplified the outputmodel and I have changed all 
> attribute to
> > optional.
> > 
> > With the outputmodelpcore2.xml the response is:
> > 
> > <RecordInformation> 
> > <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> 
> > <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> 
> > <GlobalUniqueIdentifier>GUIDS-1</GlobalUniqueIdentifier>
> > <SpeciesRecordID>1--1.1</SpeciesRecordID>
> > <Language>latin1</Language> 
> > <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 
> information in 
> > the diagnostic:
> > 
> > <diagnostic time="2006-11-17T18:24:45.32" level="warn">
> > The element
> > 
> /Species/Record/RecordInformation/SpeciesRecordCollaborators/S
> peciesRecordCollaborator/Record 
> > was limited 3 times. Some node instances have been lost.
> > </diagnostic>
> > -
> > <diagnostic time="2006-11-17T18:24:45.32" level="warn">
> > The element 
> > 
> /Species/Record/RecordInformation/SpeciesRecordAuthors/Species
> RecordAutor/Text 
> > 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ón.
> 
> _______________________________________________
> tdwg-tapir mailing list
> tdwg-tapir at lists.tdwg.org 
> http://lists.tdwg.org/mailman/listinfo/tdwg-> tapir
> 



More information about the tdwg-tag mailing list