[tdwg-tapir] Problem with Tapir and Outputmodel.

Ramón Pérez rpperez at inf.uc3m.es
Wed Nov 22 13:23:20 CET 2006


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ón.


Döring, Markus escribió:
> 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
>>
>>     
> _______________________________________________
> tdwg-tapir mailing list
> tdwg-tapir at lists.tdwg.org
> http://lists.tdwg.org/mailman/listinfo/tdwg-tapir
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log-Test2.xml
Type: text/xml
Size: 56632 bytes
Desc: not available
Url : http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20061122/5f13f998/attachment.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log-Test1.xml
Type: text/xml
Size: 57669 bytes
Desc: not available
Url : http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20061122/5f13f998/attachment-0001.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.xml
Type: text/xml
Size: 6233 bytes
Desc: not available
Url : http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20061122/5f13f998/attachment-0002.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.xml
Type: text/xml
Size: 6245 bytes
Desc: not available
Url : http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20061122/5f13f998/attachment-0003.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpperez.vcf
Type: text/x-vcard
Size: 373 bytes
Desc: not available
Url : http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20061122/5f13f998/attachment.vcf 


More information about the tdwg-tag mailing list