pywrapper-devel Mailing List for pywrapper (Page 3)
Status: Alpha
Brought to you by:
jatorre
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
(4) |
Jun
|
Jul
(40) |
Aug
(20) |
Sep
|
Oct
(10) |
Nov
(112) |
Dec
(18) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(8) |
Feb
|
Mar
|
Apr
(6) |
May
(13) |
Jun
(12) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(3) |
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(3) |
Jun
(3) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <m.d...@bg...> - 2007-04-20 13:37:34
|
Hi Tapiris, I've just released the alpha version of PyWrapper 3.1 that finally =20 supports all the TAPIR protocol changes we agreed upon during the =20 last developer meeting at GBIF. It now also runs with the latest =20 version of Python2.5. Download & installation instructions can be =20 found here as usual: http://trac.pywrapper.org/pywrapper/wiki/Downloads The final 3.1 release will add some minor bug fixes and most =20 innovative a new LSID resolver written by Kevin Richards. The missing =20= steps until the final 3.1 release can be found here: http://trac.pywrapper.org/pywrapper/milestone/3.1.0 http://trac.pywrapper.org/pywrapper/query?=20 status=3Dnew&status=3Dassigned&status=3Dreopened&milestone=3D3.1.0 If you encounter any bugs in pywrapper, please issue a ticket on =20 pywrapper.org If you prefer to write emails, feel free to send them to me or this =20 mailing list. For those of you who can't be bothered to install a TAPIR service, =20 here is a demo service running at the BGBM, please be kind: http://search.biocase.org/tapir/ Cheers Markus -- Markus D=F6ring Botanic Garden and Botanical Museum Berlin Dahlem, Dept. of Biodiversity Informatics K=F6nigin-Luise-Str. 6-8, D-14191 Berlin +49 (30) 83850-284 m.d...@bg... |
From: <m.d...@bg...> - 2007-04-05 18:43:01
|
Renato, with the change of the CNS file layout some time ago the alias.txt wasn't updated and pointed to no longer existing models and templates. that caused the errors in the http://search.biocase.org/tapir installation when doing searches. I've fixed the alias.txt file http://rs.tdwg.org/tapir/cns/alias.txt So the above installation works now for ABCD models. But it still has problems with DarwinCore models, cause they already use the new prefixed qualified paths. and that I havent found time to implement yet. I will try tonight, hopefully I manage. and the errors should be a bit more meaningfull too... Its because when downloading the wrong models I didnt check the returned http code and you do get back a file. A http 404 not found error page as HTML. But that is really not a TAPIR model. so dont eat too many eggs my friend! cheers. -- Markus On 04.04.2007, at 21:56, Renato De Giovanni wrote: > Hi Markus, > > I'm implementing a TAPIR driver to read occurrences for the biogeosdi > prototype. I tried to made it compatible with both DarwinCore1.4 and > ABCD2.06 providers, but I couldn't really test with you demo provider > without knowing any scientific name there. The following request > returns > an error: > > http://search.biocase.org/tapir/pywrapper? > dsa=training&op=inventory&concept=FullScientificName@abcd206 > > Error: Response preparation and data retrieval error > (GENERATING_CONTENT_FAILED) > > Not sure what went wrong... > -- > Renato > > |
From: Roger H. <ro...@hy...> - 2007-01-09 19:05:42
|
Well done Markus. That is brilliant news. I am not sure when I will get to try it out. I may get a chance =20 tomorrow but then I am off for with the family for a long weekend and =20= then in meetings in London early next week so it might be a week till =20= I get a go at it. I'll continue working on the output models and vocabularies so we can =20= put some more meaningful demos together. I'm also thinking about the kind of stuff would need to add to =20 PyWrapper to make it an LSID Authority. Perhaps we could talk a =20 little about that at the workshop. I don't think it would take much =20 at all. Documentation/education would probably be the hardest part. All the best, Roger On 8 Jan 2007, at 08:41, Markus D=F6ring wrote: > And basically its done now:) > The latest trunk gives back correct RDF, Roger! > I haven't been able to test this version a lot, so I am nearly =20 > positive that I must have introduced some new bugs, but at least =20 > Rogers example and the queryform requests work fine! > > Gonna try to find some time today to do some cleanup and finally =20 > stream records and not keep the entire result in memory. we'll see. > Markus > > > > On Jan 8, 2007, at 5:07 AM, Javier de la Torre wrote: > >> Hey Markus, >> >> You know that Elementtreee is already part of PyWrapper distribution >> no? I am using it in the BioMOBY part. >> >> I think we talked about it some time ago and considered moving >> everything in pywrapper to use it but discarded because it is quite >> some work and we were afraid of breaking something... >> >> But I prefer ElementTree than minidom so I am more than happy if you >> do it :) >> >> Cheers. >> >> Javi. >> >> On 05/01/2007, at 20:08, D=F6ring, Markus wrote: >> >>> I have just tried to use namespaces in attributes. to make it >>> short: it failed. Its python's minidom implementation that causes >>> the trouble. When I use the method .setAttributeNS(myNS, >>> myAttrName, value) it uses xmlns: on the element to define the >>> namespace. So if the elements NS is different, it actually >>> overwrites it! So minidom cannot handle mixed namespaces within one >>> element. >>> >>> I've checked ElementTree (which is part of python's standard since >>> version 2.5) and there it works! It even recognises the RDF >>> namespace and uses rdf: as the prefix without telling it so. >>> >>> So I have to update all of pywrapper to use ElementTree instead of >>> minidom. This is a bit more work so I dont know when there will be >>> time to update the code - in the worst case I could do this during >>> the developers meeting. >>> >>> But at least we know it will work! >>> And ElementTree is supposed to be much faster with a much smaller >>> footprint. >>> >>> Cheers, >>> Markus >>> >>> >>> >>> >>> -----Original Message----- >>> From: pyw...@li... on behalf = of >>> D=F6ring, Markus >>> Sent: Fri 1/5/2007 5:20 PM >>> To: PyWrapper Developers mailing list >>> Cc: Roger Hyam >>> Subject: Re: [PyWrapper-devel] Behold RDF is born unto us! >>> >>> well done Roger! >>> worked out of the box for me. >>> >>> I guess you are right that pywrapper ignores attribute namespaces in >>> the output. I will take a look into it. Not sure how well the >>> frameworks support attribute namespaces, cause I am not aware of how >>> to declare namespace prefixes implicitly. The code at least knows =20= >>> the >>> namespace of the attribute, so its only a matter of how to get it >>> out. Currently I am using DOM to produce the XML but I wanted to >>> migrate to Elementree at some point. I will keep you informed. >>> >>> Creating an alias.txt for the TDWG ontology would be the exact =20 >>> way we >>> thought of how to use it. So far pywrapper seemed to work fine with >>> multiple CNS files. Simply add a second one in the system configtool >>> pane. Just make sure they dont clash - that is defining the same >>> namespace or using the same namespace alias. The aliases for the >>> concepts don't matter, cause they only form one part of the total >>> concept alias. So we only need to keep track of the namespaces and >>> their aliases. >>> >>> cheers, >>> markus >>> >>> >>> On Jan 4, 2007, at 5:30 PM, Roger Hyam wrote: >>> >>>> Happy New Year everyone. >>>> >>>> If you have a local pywrapper and have connected the training >>>> datasource up to a database then you should be able to run this >>>> query (long URL) perhaps with minor tweaks to the port etc. >>>> >>>> http://localhost:8080/pywrapper/pywrapper? >>>> dsa=3Dtraining&op=3Dsearch&envelope=3Dfalse&model=3Dhttp://rs.tdwg.or= g/ >>>> ontology/voc/tapir/outputmodel/ >>>> TaxonName_001.xml&filter=3DUnitID@abcd206+like+"2422" >>>> >>>> What you will get back is (but for one minor minor thing) valid =20 >>>> RDF! >>>> >>>> After Markus' fix (and after Christmas) I turned to making a real- >>>> life output model and it is actually quite simple once you have the >>>> framework in place. >>>> >>>> This is still a fairly trivial example but it shows that it is >>>> possible and I'll continue to build on it up to the workshop. >>>> >>>> **WARNING** I am using the identifications table in the training >>>> dsa as if it contained pure nomenclatural data just because I have >>>> the TaxonName vocabulary to hand. This is not how the vocabulary >>>> should or will be used. It is just a test thing. I'll now try and >>>> do some more sensible things. >>>> >>>> The fun part is that I use the mapped ABCD concepts in my output >>>> model. So we are creating RDF from a datasource that was never >>>> intended to supply it :) Not sure how possible this will be in real >>>> life for retrofitting data suppliers who haven't done the mappings >>>> to the central concepts but is a possibility. >>>> >>>> I have one question about Concept Name Servers. It would make sense >>>> to have a CNS for the TDWG ontology. We could then define the RDF >>>> generating models and some query templates in it along with their >>>> associated concepts. We would need some convention to prevent name >>>> clashes with the alias'. >>>> >>>> Can anyone see a problem with this? Will PyWrapper pick up multiple >>>> CNS and load them all? Has this been tested? >>>> >>>> The mapping is fun here because the TAPIR concepts map to db >>>> concepts through the regular mechanisms but are also mapped, via >>>> the namespace conventions in the RDF to more general meanings. >>>> >>>> I also have a request. If you take the result of running the above >>>> (it looks like this) >>>> >>>> <?xml version=3D"1.0" encoding=3D"UTF-8"?> >>>> >>>> >>>> <RDF xmlns=3D'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> >>>> <TaxonName xmlns=3D'http://rs.tdwg.org/ontology/voc/TaxonName#' >>>> about=3D'2422'> >>>> <title xmlns=3D'http://purl.org/dc/elements/1.1/'>Calicium >>>> adspersum Pers. subsp. australe Tibell</title> >>>> <genusPart>Calicium</genusPart> >>>> <specificEpithet>adspersum</specificEpithet> >>>> <infraspecificEpithet>australe</infraspecificEpithet> >>>> </TaxonName> >>>> </RDF> >>>> >>>> and cut and paste it into the W3C RDF validator (http://www.w3.org/ >>>> RDF/Validator/) you get a single deprecated warning. >>>> >>>> Error: {W102} unqualified use of rdf:about is deprecated.[Line =3D = 5, >>>> Column =3D 78] >>>> >>>> It seems that PyWrapper isn't putting the namespace in for the >>>> attribute in the output. I have not looked into it in detail but it >>>> is specified in the model and other namespace stuff is followed so >>>> I guess it is a bug (this is the minor minor thing that will come >>>> to bite us when we need rdf:resource references going). >>>> >>>> Could someone with their hands on the code (sorry is that you >>>> Markus!) look at this one. Then I think we will be really RDF >>>> compatible. >>>> >>>> Many thanks, >>>> >>>> All the best, >>>> >>>> Roger >>>> >>>> >>>> **************************************** >>>> Roger Hyam <ro...@td...> >>>> Biodiversity Information Standards >>>> **************************************** >>>> >>>> >>>> -------------------------------------------------------------------=20= >>>> -- >>>> - >>>> --- >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>> share your >>>> opinions on IT & business topics through brief surveys - and earn >>>> cash >>>> http://www.techsay.com/default.php? >>>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV_________________________= ____=20 >>>> __ >>>> _ >>>> _______________ >>>> PyWrapper-devel mailing list >>>> PyW...@li... >>>> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >>> >>> >>> --------------------------------------------------------------------=20= >>> -- >>> --- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share your >>> opinions on IT & business topics through brief surveys - and earn =20= >>> cash >>> http://www.techsay.com/default.php? >>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >>> _______________________________________________ >>> PyWrapper-devel mailing list >>> PyW...@li... >>> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >>> >>> >>> >>> >>> --------------------------------------------------------------------=20= >>> -- >>> --- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share your >>> opinions on IT & business topics through brief surveys - and earn =20= >>> cash >>> http://www.techsay.com/default.php? >>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >>> _______________________________________________ >>> PyWrapper-devel mailing list >>> PyW...@li... >>> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >> >> >> ---------------------------------------------------------------------=20= >> ---- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to =20 >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php?=20 >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >> _______________________________________________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > |
From: Roger H. <ro...@td...> - 2007-01-09 18:59:59
|
Hi Renato, I hadn't thought of that one but I guess it would work. I wonder if it would be possible to cache the graph between calls.... You could at least query subsets of data. I'll try it later on when we have more meaningful stuff being served. Roger On 5 Jan 2007, at 10:34, Renato De Giovanni wrote: > Well done, Roger! > > By the way, it would also be interesting to see sparql being used > on top > of TAPIR, even not being the most efficient way of doing things. > > If you manage to return a bigger RDF document with several names, > you can > try this interface to select something with sparql: > > http://sparql.org/sparql.html > > You just need to know something about sparql and then put the TAPIR > url > query in the "target URI" field. > > It's really good to confirm that TAPIR can be play in the semantic > web world! > > Best Regards, > -- > Renato > >> Happy New Year everyone. >> >> If you have a local pywrapper and have connected the training >> datasource up to a database then you should be able to run this query >> (long URL) perhaps with minor tweaks to the port etc. >> >> http://localhost:8080/pywrapper/pywrapper? >> dsa=training&op=search&envelope=false&model=http://rs.tdwg.org/ >> ontology/voc/tapir/outputmodel/ >> TaxonName_001.xml&filter=UnitID@abcd206 >> +like+"2422" >> >> What you will get back is (but for one minor minor thing) valid RDF! >> >> After Markus' fix (and after Christmas) I turned to making a real- >> life output model and it is actually quite simple once you have the >> framework in place. >> >> This is still a fairly trivial example but it shows that it is >> possible and I'll continue to build on it up to the workshop. >> >> **WARNING** I am using the identifications table in the training dsa >> as if it contained pure nomenclatural data just because I have the >> TaxonName vocabulary to hand. This is not how the vocabulary should >> or will be used. It is just a test thing. I'll now try and do some >> more sensible things. >> >> The fun part is that I use the mapped ABCD concepts in my output >> model. So we are creating RDF from a datasource that was never >> intended to supply it :) Not sure how possible this will be in real >> life for retrofitting data suppliers who haven't done the mappings to >> the central concepts but is a possibility. >> >> I have one question about Concept Name Servers. It would make sense >> to have a CNS for the TDWG ontology. We could then define the RDF >> generating models and some query templates in it along with their >> associated concepts. We would need some convention to prevent name >> clashes with the alias'. >> >> Can anyone see a problem with this? Will PyWrapper pick up multiple >> CNS and load them all? Has this been tested? >> >> The mapping is fun here because the TAPIR concepts map to db concepts >> through the regular mechanisms but are also mapped, via the namespace >> conventions in the RDF to more general meanings. >> >> I also have a request. If you take the result of running the above >> (it looks like this) >> >> <?xml version="1.0" encoding="UTF-8"?> >> >> >> <RDF xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> >> <TaxonName xmlns='http://rs.tdwg.org/ontology/voc/TaxonName#' >> about='2422'> >> <title xmlns='http://purl.org/dc/elements/1.1/'>Calicium >> adspersum Pers. subsp. australe Tibell</title> >> <genusPart>Calicium</genusPart> >> <specificEpithet>adspersum</specificEpithet> >> <infraspecificEpithet>australe</infraspecificEpithet> >> </TaxonName> >> </RDF> >> >> and cut and paste it into the W3C RDF validator (http://www.w3.org/ >> RDF/Validator/) you get a single deprecated warning. >> >> Error: {W102} unqualified use of rdf:about is deprecated.[Line = 5, >> Column = 78] >> >> It seems that PyWrapper isn't putting the namespace in for the >> attribute in the output. I have not looked into it in detail but it >> is specified in the model and other namespace stuff is followed so I >> guess it is a bug (this is the minor minor thing that will come to >> bite us when we need rdf:resource references going). >> >> Could someone with their hands on the code (sorry is that you >> Markus!) look at this one. Then I think we will be really RDF >> compatible. >> >> Many thanks, >> >> All the best, >> >> Roger > > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: <m.d...@bg...> - 2007-01-08 08:42:41
|
And basically its done now:) The latest trunk gives back correct RDF, Roger! I haven't been able to test this version a lot, so I am nearly =20 positive that I must have introduced some new bugs, but at least =20 Rogers example and the queryform requests work fine! Gonna try to find some time today to do some cleanup and finally =20 stream records and not keep the entire result in memory. we'll see. Markus On Jan 8, 2007, at 5:07 AM, Javier de la Torre wrote: > Hey Markus, > > You know that Elementtreee is already part of PyWrapper distribution > no? I am using it in the BioMOBY part. > > I think we talked about it some time ago and considered moving > everything in pywrapper to use it but discarded because it is quite > some work and we were afraid of breaking something... > > But I prefer ElementTree than minidom so I am more than happy if you > do it :) > > Cheers. > > Javi. > > On 05/01/2007, at 20:08, D=F6ring, Markus wrote: > >> I have just tried to use namespaces in attributes. to make it >> short: it failed. Its python's minidom implementation that causes >> the trouble. When I use the method .setAttributeNS(myNS, >> myAttrName, value) it uses xmlns: on the element to define the >> namespace. So if the elements NS is different, it actually >> overwrites it! So minidom cannot handle mixed namespaces within one >> element. >> >> I've checked ElementTree (which is part of python's standard since >> version 2.5) and there it works! It even recognises the RDF >> namespace and uses rdf: as the prefix without telling it so. >> >> So I have to update all of pywrapper to use ElementTree instead of >> minidom. This is a bit more work so I dont know when there will be >> time to update the code - in the worst case I could do this during >> the developers meeting. >> >> But at least we know it will work! >> And ElementTree is supposed to be much faster with a much smaller >> footprint. >> >> Cheers, >> Markus >> >> >> >> >> -----Original Message----- >> From: pyw...@li... on behalf = of >> D=F6ring, Markus >> Sent: Fri 1/5/2007 5:20 PM >> To: PyWrapper Developers mailing list >> Cc: Roger Hyam >> Subject: Re: [PyWrapper-devel] Behold RDF is born unto us! >> >> well done Roger! >> worked out of the box for me. >> >> I guess you are right that pywrapper ignores attribute namespaces in >> the output. I will take a look into it. Not sure how well the >> frameworks support attribute namespaces, cause I am not aware of how >> to declare namespace prefixes implicitly. The code at least knows the >> namespace of the attribute, so its only a matter of how to get it >> out. Currently I am using DOM to produce the XML but I wanted to >> migrate to Elementree at some point. I will keep you informed. >> >> Creating an alias.txt for the TDWG ontology would be the exact way we >> thought of how to use it. So far pywrapper seemed to work fine with >> multiple CNS files. Simply add a second one in the system configtool >> pane. Just make sure they dont clash - that is defining the same >> namespace or using the same namespace alias. The aliases for the >> concepts don't matter, cause they only form one part of the total >> concept alias. So we only need to keep track of the namespaces and >> their aliases. >> >> cheers, >> markus >> >> >> On Jan 4, 2007, at 5:30 PM, Roger Hyam wrote: >> >>> Happy New Year everyone. >>> >>> If you have a local pywrapper and have connected the training >>> datasource up to a database then you should be able to run this >>> query (long URL) perhaps with minor tweaks to the port etc. >>> >>> http://localhost:8080/pywrapper/pywrapper? >>> dsa=3Dtraining&op=3Dsearch&envelope=3Dfalse&model=3Dhttp://rs.tdwg.org= / >>> ontology/voc/tapir/outputmodel/ >>> TaxonName_001.xml&filter=3DUnitID@abcd206+like+"2422" >>> >>> What you will get back is (but for one minor minor thing) valid RDF! >>> >>> After Markus' fix (and after Christmas) I turned to making a real- >>> life output model and it is actually quite simple once you have the >>> framework in place. >>> >>> This is still a fairly trivial example but it shows that it is >>> possible and I'll continue to build on it up to the workshop. >>> >>> **WARNING** I am using the identifications table in the training >>> dsa as if it contained pure nomenclatural data just because I have >>> the TaxonName vocabulary to hand. This is not how the vocabulary >>> should or will be used. It is just a test thing. I'll now try and >>> do some more sensible things. >>> >>> The fun part is that I use the mapped ABCD concepts in my output >>> model. So we are creating RDF from a datasource that was never >>> intended to supply it :) Not sure how possible this will be in real >>> life for retrofitting data suppliers who haven't done the mappings >>> to the central concepts but is a possibility. >>> >>> I have one question about Concept Name Servers. It would make sense >>> to have a CNS for the TDWG ontology. We could then define the RDF >>> generating models and some query templates in it along with their >>> associated concepts. We would need some convention to prevent name >>> clashes with the alias'. >>> >>> Can anyone see a problem with this? Will PyWrapper pick up multiple >>> CNS and load them all? Has this been tested? >>> >>> The mapping is fun here because the TAPIR concepts map to db >>> concepts through the regular mechanisms but are also mapped, via >>> the namespace conventions in the RDF to more general meanings. >>> >>> I also have a request. If you take the result of running the above >>> (it looks like this) >>> >>> <?xml version=3D"1.0" encoding=3D"UTF-8"?> >>> >>> >>> <RDF xmlns=3D'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> >>> <TaxonName xmlns=3D'http://rs.tdwg.org/ontology/voc/TaxonName#' >>> about=3D'2422'> >>> <title xmlns=3D'http://purl.org/dc/elements/1.1/'>Calicium >>> adspersum Pers. subsp. australe Tibell</title> >>> <genusPart>Calicium</genusPart> >>> <specificEpithet>adspersum</specificEpithet> >>> <infraspecificEpithet>australe</infraspecificEpithet> >>> </TaxonName> >>> </RDF> >>> >>> and cut and paste it into the W3C RDF validator (http://www.w3.org/ >>> RDF/Validator/) you get a single deprecated warning. >>> >>> Error: {W102} unqualified use of rdf:about is deprecated.[Line =3D = 5, >>> Column =3D 78] >>> >>> It seems that PyWrapper isn't putting the namespace in for the >>> attribute in the output. I have not looked into it in detail but it >>> is specified in the model and other namespace stuff is followed so >>> I guess it is a bug (this is the minor minor thing that will come >>> to bite us when we need rdf:resource references going). >>> >>> Could someone with their hands on the code (sorry is that you >>> Markus!) look at this one. Then I think we will be really RDF >>> compatible. >>> >>> Many thanks, >>> >>> All the best, >>> >>> Roger >>> >>> >>> **************************************** >>> Roger Hyam <ro...@td...> >>> Biodiversity Information Standards >>> **************************************** >>> >>> >>> --------------------------------------------------------------------=20= >>> - >>> - >>> --- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share your >>> opinions on IT & business topics through brief surveys - and earn >>> cash >>> http://www.techsay.com/default.php? >>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV__________________________= ____=20 >>> _ >>> _ >>> _______________ >>> PyWrapper-devel mailing list >>> PyW...@li... >>> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >> >> >> ---------------------------------------------------------------------=20= >> - >> --- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php? >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >> _______________________________________________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >> >> >> >> >> ---------------------------------------------------------------------=20= >> - >> --- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php? >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >> _______________________________________________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: Javier de la T. <ja...@gm...> - 2007-01-08 04:07:28
|
Hey Markus, You know that Elementtreee is already part of PyWrapper distribution =20 no? I am using it in the BioMOBY part. I think we talked about it some time ago and considered moving =20 everything in pywrapper to use it but discarded because it is quite =20 some work and we were afraid of breaking something... But I prefer ElementTree than minidom so I am more than happy if you =20 do it :) Cheers. Javi. On 05/01/2007, at 20:08, D=F6ring, Markus wrote: > I have just tried to use namespaces in attributes. to make it =20 > short: it failed. Its python's minidom implementation that causes =20 > the trouble. When I use the method .setAttributeNS(myNS, =20 > myAttrName, value) it uses xmlns: on the element to define the =20 > namespace. So if the elements NS is different, it actually =20 > overwrites it! So minidom cannot handle mixed namespaces within one =20= > element. > > I've checked ElementTree (which is part of python's standard since =20 > version 2.5) and there it works! It even recognises the RDF =20 > namespace and uses rdf: as the prefix without telling it so. > > So I have to update all of pywrapper to use ElementTree instead of =20 > minidom. This is a bit more work so I dont know when there will be =20 > time to update the code - in the worst case I could do this during =20 > the developers meeting. > > But at least we know it will work! > And ElementTree is supposed to be much faster with a much smaller =20 > footprint. > > Cheers, > Markus > > > > > -----Original Message----- > From: pyw...@li... on behalf of =20 > D=F6ring, Markus > Sent: Fri 1/5/2007 5:20 PM > To: PyWrapper Developers mailing list > Cc: Roger Hyam > Subject: Re: [PyWrapper-devel] Behold RDF is born unto us! > > well done Roger! > worked out of the box for me. > > I guess you are right that pywrapper ignores attribute namespaces in > the output. I will take a look into it. Not sure how well the > frameworks support attribute namespaces, cause I am not aware of how > to declare namespace prefixes implicitly. The code at least knows the > namespace of the attribute, so its only a matter of how to get it > out. Currently I am using DOM to produce the XML but I wanted to > migrate to Elementree at some point. I will keep you informed. > > Creating an alias.txt for the TDWG ontology would be the exact way we > thought of how to use it. So far pywrapper seemed to work fine with > multiple CNS files. Simply add a second one in the system configtool > pane. Just make sure they dont clash - that is defining the same > namespace or using the same namespace alias. The aliases for the > concepts don't matter, cause they only form one part of the total > concept alias. So we only need to keep track of the namespaces and > their aliases. > > cheers, > markus > > > On Jan 4, 2007, at 5:30 PM, Roger Hyam wrote: > >> Happy New Year everyone. >> >> If you have a local pywrapper and have connected the training >> datasource up to a database then you should be able to run this >> query (long URL) perhaps with minor tweaks to the port etc. >> >> http://localhost:8080/pywrapper/pywrapper? >> dsa=3Dtraining&op=3Dsearch&envelope=3Dfalse&model=3Dhttp://rs.tdwg.org/= >> ontology/voc/tapir/outputmodel/ >> TaxonName_001.xml&filter=3DUnitID@abcd206+like+"2422" >> >> What you will get back is (but for one minor minor thing) valid RDF! >> >> After Markus' fix (and after Christmas) I turned to making a real- >> life output model and it is actually quite simple once you have the >> framework in place. >> >> This is still a fairly trivial example but it shows that it is >> possible and I'll continue to build on it up to the workshop. >> >> **WARNING** I am using the identifications table in the training >> dsa as if it contained pure nomenclatural data just because I have >> the TaxonName vocabulary to hand. This is not how the vocabulary >> should or will be used. It is just a test thing. I'll now try and >> do some more sensible things. >> >> The fun part is that I use the mapped ABCD concepts in my output >> model. So we are creating RDF from a datasource that was never >> intended to supply it :) Not sure how possible this will be in real >> life for retrofitting data suppliers who haven't done the mappings >> to the central concepts but is a possibility. >> >> I have one question about Concept Name Servers. It would make sense >> to have a CNS for the TDWG ontology. We could then define the RDF >> generating models and some query templates in it along with their >> associated concepts. We would need some convention to prevent name >> clashes with the alias'. >> >> Can anyone see a problem with this? Will PyWrapper pick up multiple >> CNS and load them all? Has this been tested? >> >> The mapping is fun here because the TAPIR concepts map to db >> concepts through the regular mechanisms but are also mapped, via >> the namespace conventions in the RDF to more general meanings. >> >> I also have a request. If you take the result of running the above >> (it looks like this) >> >> <?xml version=3D"1.0" encoding=3D"UTF-8"?> >> >> >> <RDF xmlns=3D'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> >> <TaxonName xmlns=3D'http://rs.tdwg.org/ontology/voc/TaxonName#' >> about=3D'2422'> >> <title xmlns=3D'http://purl.org/dc/elements/1.1/'>Calicium >> adspersum Pers. subsp. australe Tibell</title> >> <genusPart>Calicium</genusPart> >> <specificEpithet>adspersum</specificEpithet> >> <infraspecificEpithet>australe</infraspecificEpithet> >> </TaxonName> >> </RDF> >> >> and cut and paste it into the W3C RDF validator (http://www.w3.org/ >> RDF/Validator/) you get a single deprecated warning. >> >> Error: {W102} unqualified use of rdf:about is deprecated.[Line =3D 5, >> Column =3D 78] >> >> It seems that PyWrapper isn't putting the namespace in for the >> attribute in the output. I have not looked into it in detail but it >> is specified in the model and other namespace stuff is followed so >> I guess it is a bug (this is the minor minor thing that will come >> to bite us when we need rdf:resource references going). >> >> Could someone with their hands on the code (sorry is that you >> Markus!) look at this one. Then I think we will be really RDF >> compatible. >> >> Many thanks, >> >> All the best, >> >> Roger >> >> >> **************************************** >> Roger Hyam <ro...@td...> >> Biodiversity Information Standards >> **************************************** >> >> >> ---------------------------------------------------------------------=20= >> - >> --- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php? >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV___________________________= ____=20 >> _ >> _______________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > > > > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: <m.d...@BG...> - 2007-01-05 19:09:06
|
I have just tried to use namespaces in attributes. to make it short: it = failed. Its python's minidom implementation that causes the trouble. = When I use the method .setAttributeNS(myNS, myAttrName, value) it uses = xmlns: on the element to define the namespace. So if the elements NS is = different, it actually overwrites it! So minidom cannot handle mixed = namespaces within one element. I've checked ElementTree (which is part of python's standard since = version 2.5) and there it works! It even recognises the RDF namespace = and uses rdf: as the prefix without telling it so. So I have to update all of pywrapper to use ElementTree instead of = minidom. This is a bit more work so I dont know when there will be time = to update the code - in the worst case I could do this during the = developers meeting. But at least we know it will work! And ElementTree is supposed to be much faster with a much smaller = footprint. Cheers, Markus -----Original Message----- From: pyw...@li... on behalf of = D=F6ring, Markus Sent: Fri 1/5/2007 5:20 PM To: PyWrapper Developers mailing list Cc: Roger Hyam Subject: Re: [PyWrapper-devel] Behold RDF is born unto us! well done Roger! worked out of the box for me. I guess you are right that pywrapper ignores attribute namespaces in =20 the output. I will take a look into it. Not sure how well the =20 frameworks support attribute namespaces, cause I am not aware of how =20 to declare namespace prefixes implicitly. The code at least knows the =20 namespace of the attribute, so its only a matter of how to get it =20 out. Currently I am using DOM to produce the XML but I wanted to =20 migrate to Elementree at some point. I will keep you informed. Creating an alias.txt for the TDWG ontology would be the exact way we =20 thought of how to use it. So far pywrapper seemed to work fine with =20 multiple CNS files. Simply add a second one in the system configtool =20 pane. Just make sure they dont clash - that is defining the same =20 namespace or using the same namespace alias. The aliases for the =20 concepts don't matter, cause they only form one part of the total =20 concept alias. So we only need to keep track of the namespaces and =20 their aliases. cheers, markus On Jan 4, 2007, at 5:30 PM, Roger Hyam wrote: > Happy New Year everyone. > > If you have a local pywrapper and have connected the training =20 > datasource up to a database then you should be able to run this =20 > query (long URL) perhaps with minor tweaks to the port etc. > > http://localhost:8080/pywrapper/pywrapper?=20 > = dsa=3Dtraining&op=3Dsearch&envelope=3Dfalse&model=3Dhttp://rs.tdwg.org/=20 > ontology/voc/tapir/outputmodel/=20 > TaxonName_001.xml&filter=3DUnitID@abcd206+like+"2422" > > What you will get back is (but for one minor minor thing) valid RDF! > > After Markus' fix (and after Christmas) I turned to making a real-=20 > life output model and it is actually quite simple once you have the =20 > framework in place. > > This is still a fairly trivial example but it shows that it is =20 > possible and I'll continue to build on it up to the workshop. > > **WARNING** I am using the identifications table in the training =20 > dsa as if it contained pure nomenclatural data just because I have =20 > the TaxonName vocabulary to hand. This is not how the vocabulary =20 > should or will be used. It is just a test thing. I'll now try and =20 > do some more sensible things. > > The fun part is that I use the mapped ABCD concepts in my output =20 > model. So we are creating RDF from a datasource that was never =20 > intended to supply it :) Not sure how possible this will be in real =20 > life for retrofitting data suppliers who haven't done the mappings =20 > to the central concepts but is a possibility. > > I have one question about Concept Name Servers. It would make sense =20 > to have a CNS for the TDWG ontology. We could then define the RDF =20 > generating models and some query templates in it along with their =20 > associated concepts. We would need some convention to prevent name =20 > clashes with the alias'. > > Can anyone see a problem with this? Will PyWrapper pick up multiple =20 > CNS and load them all? Has this been tested? > > The mapping is fun here because the TAPIR concepts map to db =20 > concepts through the regular mechanisms but are also mapped, via =20 > the namespace conventions in the RDF to more general meanings. > > I also have a request. If you take the result of running the above =20 > (it looks like this) > > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > > > <RDF xmlns=3D'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> > <TaxonName xmlns=3D'http://rs.tdwg.org/ontology/voc/TaxonName#' =20 > about=3D'2422'> > <title xmlns=3D'http://purl.org/dc/elements/1.1/'>Calicium =20 > adspersum Pers. subsp. australe Tibell</title> > <genusPart>Calicium</genusPart> > <specificEpithet>adspersum</specificEpithet> > <infraspecificEpithet>australe</infraspecificEpithet> > </TaxonName> > </RDF> > > and cut and paste it into the W3C RDF validator (http://www.w3.org/=20 > RDF/Validator/) you get a single deprecated warning. > > Error: {W102} unqualified use of rdf:about is deprecated.[Line =3D 5, = > Column =3D 78] > > It seems that PyWrapper isn't putting the namespace in for the =20 > attribute in the output. I have not looked into it in detail but it =20 > is specified in the model and other namespace stuff is followed so =20 > I guess it is a bug (this is the minor minor thing that will come =20 > to bite us when we need rdf:resource references going). > > Could someone with their hands on the code (sorry is that you =20 > Markus!) look at this one. Then I think we will be really RDF =20 > compatible. > > Many thanks, > > All the best, > > Roger > > > **************************************** > Roger Hyam <ro...@td...> > Biodiversity Information Standards > **************************************** > > > ---------------------------------------------------------------------- = > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > = page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV_____________________________= ___=20 > _______________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ PyWrapper-devel mailing list PyW...@li... https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: <m.d...@bg...> - 2007-01-05 16:21:19
|
well done Roger! worked out of the box for me. I guess you are right that pywrapper ignores attribute namespaces in the output. I will take a look into it. Not sure how well the frameworks support attribute namespaces, cause I am not aware of how to declare namespace prefixes implicitly. The code at least knows the namespace of the attribute, so its only a matter of how to get it out. Currently I am using DOM to produce the XML but I wanted to migrate to Elementree at some point. I will keep you informed. Creating an alias.txt for the TDWG ontology would be the exact way we thought of how to use it. So far pywrapper seemed to work fine with multiple CNS files. Simply add a second one in the system configtool pane. Just make sure they dont clash - that is defining the same namespace or using the same namespace alias. The aliases for the concepts don't matter, cause they only form one part of the total concept alias. So we only need to keep track of the namespaces and their aliases. cheers, markus On Jan 4, 2007, at 5:30 PM, Roger Hyam wrote: > Happy New Year everyone. > > If you have a local pywrapper and have connected the training > datasource up to a database then you should be able to run this > query (long URL) perhaps with minor tweaks to the port etc. > > http://localhost:8080/pywrapper/pywrapper? > dsa=training&op=search&envelope=false&model=http://rs.tdwg.org/ > ontology/voc/tapir/outputmodel/ > TaxonName_001.xml&filter=UnitID@abcd206+like+"2422" > > What you will get back is (but for one minor minor thing) valid RDF! > > After Markus' fix (and after Christmas) I turned to making a real- > life output model and it is actually quite simple once you have the > framework in place. > > This is still a fairly trivial example but it shows that it is > possible and I'll continue to build on it up to the workshop. > > **WARNING** I am using the identifications table in the training > dsa as if it contained pure nomenclatural data just because I have > the TaxonName vocabulary to hand. This is not how the vocabulary > should or will be used. It is just a test thing. I'll now try and > do some more sensible things. > > The fun part is that I use the mapped ABCD concepts in my output > model. So we are creating RDF from a datasource that was never > intended to supply it :) Not sure how possible this will be in real > life for retrofitting data suppliers who haven't done the mappings > to the central concepts but is a possibility. > > I have one question about Concept Name Servers. It would make sense > to have a CNS for the TDWG ontology. We could then define the RDF > generating models and some query templates in it along with their > associated concepts. We would need some convention to prevent name > clashes with the alias'. > > Can anyone see a problem with this? Will PyWrapper pick up multiple > CNS and load them all? Has this been tested? > > The mapping is fun here because the TAPIR concepts map to db > concepts through the regular mechanisms but are also mapped, via > the namespace conventions in the RDF to more general meanings. > > I also have a request. If you take the result of running the above > (it looks like this) > > <?xml version="1.0" encoding="UTF-8"?> > > > <RDF xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> > <TaxonName xmlns='http://rs.tdwg.org/ontology/voc/TaxonName#' > about='2422'> > <title xmlns='http://purl.org/dc/elements/1.1/'>Calicium > adspersum Pers. subsp. australe Tibell</title> > <genusPart>Calicium</genusPart> > <specificEpithet>adspersum</specificEpithet> > <infraspecificEpithet>australe</infraspecificEpithet> > </TaxonName> > </RDF> > > and cut and paste it into the W3C RDF validator (http://www.w3.org/ > RDF/Validator/) you get a single deprecated warning. > > Error: {W102} unqualified use of rdf:about is deprecated.[Line = 5, > Column = 78] > > It seems that PyWrapper isn't putting the namespace in for the > attribute in the output. I have not looked into it in detail but it > is specified in the model and other namespace stuff is followed so > I guess it is a bug (this is the minor minor thing that will come > to bite us when we need rdf:resource references going). > > Could someone with their hands on the code (sorry is that you > Markus!) look at this one. Then I think we will be really RDF > compatible. > > Many thanks, > > All the best, > > Roger > > > **************************************** > Roger Hyam <ro...@td...> > Biodiversity Information Standards > **************************************** > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV________________________________ > _______________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: Renato De G. <re...@cr...> - 2007-01-05 10:34:33
|
Well done, Roger! By the way, it would also be interesting to see sparql being used on top of TAPIR, even not being the most efficient way of doing things. If you manage to return a bigger RDF document with several names, you can try this interface to select something with sparql: http://sparql.org/sparql.html You just need to know something about sparql and then put the TAPIR url query in the "target URI" field. It's really good to confirm that TAPIR can be play in the semantic web world! Best Regards, -- Renato > Happy New Year everyone. > > If you have a local pywrapper and have connected the training > datasource up to a database then you should be able to run this query > (long URL) perhaps with minor tweaks to the port etc. > > http://localhost:8080/pywrapper/pywrapper? > dsa=training&op=search&envelope=false&model=http://rs.tdwg.org/ > ontology/voc/tapir/outputmodel/TaxonName_001.xml&filter=UnitID@abcd206 > +like+"2422" > > What you will get back is (but for one minor minor thing) valid RDF! > > After Markus' fix (and after Christmas) I turned to making a real- > life output model and it is actually quite simple once you have the > framework in place. > > This is still a fairly trivial example but it shows that it is > possible and I'll continue to build on it up to the workshop. > > **WARNING** I am using the identifications table in the training dsa > as if it contained pure nomenclatural data just because I have the > TaxonName vocabulary to hand. This is not how the vocabulary should > or will be used. It is just a test thing. I'll now try and do some > more sensible things. > > The fun part is that I use the mapped ABCD concepts in my output > model. So we are creating RDF from a datasource that was never > intended to supply it :) Not sure how possible this will be in real > life for retrofitting data suppliers who haven't done the mappings to > the central concepts but is a possibility. > > I have one question about Concept Name Servers. It would make sense > to have a CNS for the TDWG ontology. We could then define the RDF > generating models and some query templates in it along with their > associated concepts. We would need some convention to prevent name > clashes with the alias'. > > Can anyone see a problem with this? Will PyWrapper pick up multiple > CNS and load them all? Has this been tested? > > The mapping is fun here because the TAPIR concepts map to db concepts > through the regular mechanisms but are also mapped, via the namespace > conventions in the RDF to more general meanings. > > I also have a request. If you take the result of running the above > (it looks like this) > > <?xml version="1.0" encoding="UTF-8"?> > > > <RDF xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> > <TaxonName xmlns='http://rs.tdwg.org/ontology/voc/TaxonName#' > about='2422'> > <title xmlns='http://purl.org/dc/elements/1.1/'>Calicium > adspersum Pers. subsp. australe Tibell</title> > <genusPart>Calicium</genusPart> > <specificEpithet>adspersum</specificEpithet> > <infraspecificEpithet>australe</infraspecificEpithet> > </TaxonName> > </RDF> > > and cut and paste it into the W3C RDF validator (http://www.w3.org/ > RDF/Validator/) you get a single deprecated warning. > > Error: {W102} unqualified use of rdf:about is deprecated.[Line = 5, > Column = 78] > > It seems that PyWrapper isn't putting the namespace in for the > attribute in the output. I have not looked into it in detail but it > is specified in the model and other namespace stuff is followed so I > guess it is a bug (this is the minor minor thing that will come to > bite us when we need rdf:resource references going). > > Could someone with their hands on the code (sorry is that you > Markus!) look at this one. Then I think we will be really RDF > compatible. > > Many thanks, > > All the best, > > Roger |
From: Roger H. <ro...@td...> - 2007-01-04 16:30:14
|
Happy New Year everyone. If you have a local pywrapper and have connected the training datasource up to a database then you should be able to run this query (long URL) perhaps with minor tweaks to the port etc. http://localhost:8080/pywrapper/pywrapper? dsa=training&op=search&envelope=false&model=http://rs.tdwg.org/ ontology/voc/tapir/outputmodel/TaxonName_001.xml&filter=UnitID@abcd206 +like+"2422" What you will get back is (but for one minor minor thing) valid RDF! After Markus' fix (and after Christmas) I turned to making a real- life output model and it is actually quite simple once you have the framework in place. This is still a fairly trivial example but it shows that it is possible and I'll continue to build on it up to the workshop. **WARNING** I am using the identifications table in the training dsa as if it contained pure nomenclatural data just because I have the TaxonName vocabulary to hand. This is not how the vocabulary should or will be used. It is just a test thing. I'll now try and do some more sensible things. The fun part is that I use the mapped ABCD concepts in my output model. So we are creating RDF from a datasource that was never intended to supply it :) Not sure how possible this will be in real life for retrofitting data suppliers who haven't done the mappings to the central concepts but is a possibility. I have one question about Concept Name Servers. It would make sense to have a CNS for the TDWG ontology. We could then define the RDF generating models and some query templates in it along with their associated concepts. We would need some convention to prevent name clashes with the alias'. Can anyone see a problem with this? Will PyWrapper pick up multiple CNS and load them all? Has this been tested? The mapping is fun here because the TAPIR concepts map to db concepts through the regular mechanisms but are also mapped, via the namespace conventions in the RDF to more general meanings. I also have a request. If you take the result of running the above (it looks like this) <?xml version="1.0" encoding="UTF-8"?> <RDF xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <TaxonName xmlns='http://rs.tdwg.org/ontology/voc/TaxonName#' about='2422'> <title xmlns='http://purl.org/dc/elements/1.1/'>Calicium adspersum Pers. subsp. australe Tibell</title> <genusPart>Calicium</genusPart> <specificEpithet>adspersum</specificEpithet> <infraspecificEpithet>australe</infraspecificEpithet> </TaxonName> </RDF> and cut and paste it into the W3C RDF validator (http://www.w3.org/ RDF/Validator/) you get a single deprecated warning. Error: {W102} unqualified use of rdf:about is deprecated.[Line = 5, Column = 78] It seems that PyWrapper isn't putting the namespace in for the attribute in the output. I have not looked into it in detail but it is specified in the model and other namespace stuff is followed so I guess it is a bug (this is the minor minor thing that will come to bite us when we need rdf:resource references going). Could someone with their hands on the code (sorry is that you Markus!) look at this one. Then I think we will be really RDF compatible. Many thanks, All the best, Roger **************************************** Roger Hyam <ro...@td...> Biodiversity Information Standards **************************************** |
From: <m.d...@bg...> - 2006-12-19 12:20:59
|
xsom looks nice. sad I couldnt make use of it. as you might have seen on the pywrapper-dev list im having troubles again with rogers super complex rdf schemas. its pretty hard to make sure your parser does it all. good luck! markus On Dec 19, 2006, at 12:44 PM, Renato De Giovanni wrote: > Hi Markus, > >> The xml schema parser inside pywrapper is a custom implementation. I >> couldnt find any existing schema parser out there, honestly. > > I also couldn't find one for PHP... :-( > > But I came across these two interesting links: > > 1) An implementation for VB: > > http://samples.gotdotnet.com/quickstart/howto/doc/Xml/ > XmlSchemaObjectModel.aspx > > (you should try running the example to see XML instances being created > from a schema) > > 2) Another one for Java: > > https://xsom.dev.java.net/ > > This Java library seems to be really really cool. It follows in every > detail the data model specified by the normative document about schema > components: > > http://www.w3.org/TR/xmlschema-1/ > > This document also has a diagram showing all schema components and how > they relate to each other. It's being quite useful for me. > > If you're also curious, the author of the library works at Sun, and > you > can find some interesting recent developments in the end of his > home page: > > http://www.kohsuke.org/ > > Best Regards, > -- > Renato > > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: Renato De G. <re...@cr...> - 2006-12-19 11:45:10
|
Hi Markus, > The xml schema parser inside pywrapper is a custom implementation. I > couldnt find any existing schema parser out there, honestly. I also couldn't find one for PHP... :-( But I came across these two interesting links: 1) An implementation for VB: http://samples.gotdotnet.com/quickstart/howto/doc/Xml/XmlSchemaObjectModel.aspx (you should try running the example to see XML instances being created from a schema) 2) Another one for Java: https://xsom.dev.java.net/ This Java library seems to be really really cool. It follows in every detail the data model specified by the normative document about schema components: http://www.w3.org/TR/xmlschema-1/ This document also has a diagram showing all schema components and how they relate to each other. It's being quite useful for me. If you're also curious, the author of the library works at Sun, and you can find some interesting recent developments in the end of his home page: http://www.kohsuke.org/ Best Regards, -- Renato |
From: Roger H. <ro...@hy...> - 2006-12-18 17:55:00
|
Thanks Markus, I'll have a look at it over the next few days - still have shopping =20 to do myself. I was presuming that the schemas would have to be modified in some =20 way to produce usable output models. I'll get the code and have a =20 hack at the schemas to see what I can get going. Many thanks and Merry Christmas, Roger On 18 Dec 2006, at 16:04, Markus D=F6ring wrote: > Roger, > I've updated pywrapper in the SVN trunk. Your example =20 > test1_broken.xsd works fine now. I had to change some methods in =20 > the structure_handler.py and I hope I didnt break anything. I dont =20 > think so, but as you might know we are still missing comfortable =20 > unit tests, so all I can do is run through some schemas/models I =20 > know they should work (like abcd and tcs). and that test is =20 > successfully acomplished. > > But if I run your previous complex real world example I still got =20 > an error. I found that you are using a recursive construct =20 > TaxonName that can be a link or another TaxonName. This is not =20 > supported by pywrapper at the moment. When encountering such =20 > constructs the software should give out a warning and ignore the =20 > recursion (just work with it as if there was no further reference). =20= > But right now it raises an error and refuses to work with that =20 > model. I still need some christmas presents so I cant continue on =20 > that, maybe something for the coding fest - together with the yet =20 > unsopported "group" tag you mentioned earlier (shouldnt be too hard). > > Anyway you should be able to continue with your RDF test. Just =20 > avoid recursions and also the xml schema "group" tag. > And please keep us informed about the results! > > Markus > > > > > On Dec 15, 2006, at 5:32 PM, Roger Hyam wrote: > >> Thanks for the kind words Markus. I'm glad some one is glad I am =20 >> trying to do this ;) I hope it doesn't end up with too much work =20 >> for you. >> >> I have narrowed down this problem to a simple test case. >> >> This is a more simple XSD with a single import and it works fine: >> >> http://localhost:8080/pywrapper/pywrapper?=20 >> op=3Dschema&location=3Dhttp://rs.tdwg.org/ontology/voc/xsd/test1.xsd >> >> The second version is just the same but includes the use of an =20 >> attribute reference in the imported file: >> >> http://localhost:8080/pywrapper/pywrapper?=20 >> op=3Dschema&location=3Dhttp://rs.tdwg.org/ontology/voc/xsd/=20 >> test1_broken.xsd >> >> and it doesn't work! >> >> Looking at the logs >> >> The error message is >> >> "PyWrapperError: Global element reference 'http://rs.tdwg.org/=20 >> ontology/voc/Test2#/rdf:about' missing" >> >> But we have a slightly earlier log message saying >> >> 2006-12-15 16:14:14,789 - DEBUG from pywrapper.model: =20 >> self._globalRefs=3D[u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/=20 >> @about', u'http://rs.tdwg.org/ontology/voc/Test2#/MyElement', =20 >> u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/RDF', u'http://=20 >> www.w3.org/1999/02/22-rdf-syntax-ns#/MyRdfString'] >> >> So it looks to me like it is just getting the namespace of the =20 >> attribute reference wrong and so not finding it in the globalRefs =20 >> look up. It does it right for the element but not for the attribute. >> >> Looking at the code for _buildAttribute(self, attrs) on line 269 =20 >> in structure_handler.py it doesn't mention namespace (unlike the =20= >> _buildElement attribute) and it confuses me as it seems to pass =20 >> the type as the namespace to the Attribute object it creates. >> >> Now this code all looks like clever stuff and I don't want to go =20 >> trying to fix anything when I don't really know what I am doing - =20 >> though I will have a go if no one else wants to. You may be able =20 >> to fix this in minutes rather than my hours and would probably =20 >> create fewer bugs . >> >> It may be that I am doing something bad in the XSD although I am =20 >> pretty confident I am OK on that. >> >> Would once again be grateful for you comments, >> >> Roger >> >> >> >> >> On 14 Dec 2006, at 10:48, Markus D=F6ring wrote: >> >>> Hi Roger, >>> that's exactly what we were all thinking of doing for some time =20 >>> already. Good finally someone DOES it! >>> The xml schema parser inside pywrapper is a custom =20 >>> implementation. I couldnt find any existing schema parser out =20 >>> there, honestly. So as you can imagine this is a pretty tough job =20= >>> and I have tried it with many different schemas and progressed in =20= >>> implementing xml schema, but still dont support all of it (for =20 >>> example references and patterns). >>> >>> Well, and your RDF schema is honestly the most complex I've seen =20 >>> that was fed to pywrapper. >>> So I tried to trace the problem and as you see pywrapper =20 >>> complaints that the attribute http://rs.tdwg.org/ontology/voc/=20 >>> TaxonName#/rdf:about is being referenced, but is nowhere defined. >>> pywrapper expands all namespace prefixes into the full namespace. =20= >>> So in this case http://rs.tdwg.org/ontology/voc/TaxonName# is the =20= >>> targetnamespace of the imported lib/TaxonName.xsd schema file. So =20= >>> in there I suspect is a reference to rdf:about, which pywrapper =20 >>> thinks is an attribute name. I think this is because I cant find =20 >>> anywhere the prefix rdf: being defined properly. I suspect oXygen =20= >>> and alike know what rdf: means. So try to add a namespace =20 >>> declaration to the schemas (for owl etc too). Then pywrapper =20 >>> should expand rdf:about into the full qualified name http://=20 >>> www.w3.org/1999/02/22-rdf-syntax-ns#about and hopefully find the =20 >>> global declaration of rdf:about in the lib/rdf.xsd schema. >>> >>> But again, I think I've never tried a schema with that many =20 >>> namespaces and imports so I keep my fingers crossed... >>> >>> Please let me know what happens! >>> Markus >>> >>> >>> >>> On Dec 13, 2006, at 11:29 PM, Roger Hyam wrote: >>> >>>> Hi All, >>>> >>>> I am looking at what TAPIR output models I could use with =20 >>>> PyWrapper. I have developed XML Schemas that will help produce =20 >>>> valid RDF instance data for a simple OWL ontology. Here is an =20 >>>> example: >>>> >>>> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd >>>> >>>> If you open this link in OxygenXML or Spy you can expand all the =20= >>>> nodes and create instance documents that look like valid RDF. =20 >>>> Here is an example instance document: >>>> >>>> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/template.xml >>>> >>>> So the plan would be to use the schema above (or something =20 >>>> similar) as the structure in an output model so that a TAPIR =20 >>>> response could be a valid semantic web document and a LSID =20 >>>> metadata response. A complete LSID authority would need very =20 >>>> little code on top of this. >>>> >>>> The downside is that these schemas are complex because of the =20 >>>> number of imports required to support the different namespaces =20 >>>> involved. >>>> >>>> Anyhow. The first step was to check that PyWrapper would parse =20 >>>> schemas like the one above so I did this: >>>> >>>> http://localhost:8080/pywrapper/pywrapper?=20 >>>> op=3Dschema&location=3Dhttp://rs.tdwg.org/ontology/voc/xsd/TaxonName/= =20 >>>> schema.xsd >>>> >>>> on my local machine and got >>>> >>>> "The models response structure is invalid: Global element =20 >>>> reference 'http://rs.tdwg.org/ontology/voc/TaxonName#/rdf:about' =20= >>>> missing" >>>> >>>> I am not sure why I get this as OxygenXML doesn't have a problem =20= >>>> with expanding the links and validating the rdf:about attribute =20 >>>> so I *think* the schema is OK. The parser is handling the import =20= >>>> of TaxonName.xsd OK. Is it a problem with attributes? Is it a =20 >>>> bug or a known limitation or an error in my schema? >>>> >>>> The are also problems with the group element but I can always =20 >>>> work round this by just repeating the element. >>>> >>>> Any ideas on the rdf:about problem would be most welcome. >>>> >>>> Many thanks, >>>> >>>> Roger >>>> >>>> >>>> >>>> >>>> >>>> **************************************** >>>> Roger Hyam <ro...@td...> >>>> Biodiversity Information Standards >>>> **************************************** >>>> >>>> >>>> -------------------------------------------------------------------=20= >>>> ------ >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance =20 >>>> to share your >>>> opinions on IT & business topics through brief surveys - and =20 >>>> earn cash >>>> http://www.techsay.com/default.php?=20 >>>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV_________________________= ____=20 >>>> __________________ >>>> PyWrapper-devel mailing list >>>> PyW...@li... >>>> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >>> >> >> ---------------------------------------------------------------------=20= >> ---- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to =20 >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php?=20 >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV___________________________= ____=20 >> ________________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > |
From: <m.d...@bg...> - 2006-12-18 16:07:23
|
Roger, I've updated pywrapper in the SVN trunk. Your example =20 test1_broken.xsd works fine now. I had to change some methods in the =20 structure_handler.py and I hope I didnt break anything. I dont think =20 so, but as you might know we are still missing comfortable unit =20 tests, so all I can do is run through some schemas/models I know they =20= should work (like abcd and tcs). and that test is successfully =20 acomplished. But if I run your previous complex real world example I still got an =20 error. I found that you are using a recursive construct TaxonName =20 that can be a link or another TaxonName. This is not supported by =20 pywrapper at the moment. When encountering such constructs the =20 software should give out a warning and ignore the recursion (just =20 work with it as if there was no further reference). But right now it =20 raises an error and refuses to work with that model. I still need =20 some christmas presents so I cant continue on that, maybe something =20 for the coding fest - together with the yet unsopported "group" tag =20 you mentioned earlier (shouldnt be too hard). Anyway you should be able to continue with your RDF test. Just avoid =20 recursions and also the xml schema "group" tag. And please keep us informed about the results! Markus On Dec 15, 2006, at 5:32 PM, Roger Hyam wrote: > Thanks for the kind words Markus. I'm glad some one is glad I am =20 > trying to do this ;) I hope it doesn't end up with too much work =20 > for you. > > I have narrowed down this problem to a simple test case. > > This is a more simple XSD with a single import and it works fine: > > http://localhost:8080/pywrapper/pywrapper?op=3Dschema&location=3Dhttp://= =20 > rs.tdwg.org/ontology/voc/xsd/test1.xsd > > The second version is just the same but includes the use of an =20 > attribute reference in the imported file: > > http://localhost:8080/pywrapper/pywrapper?op=3Dschema&location=3Dhttp://= =20 > rs.tdwg.org/ontology/voc/xsd/test1_broken.xsd > > and it doesn't work! > > Looking at the logs > > The error message is > > "PyWrapperError: Global element reference 'http://rs.tdwg.org/=20 > ontology/voc/Test2#/rdf:about' missing" > > But we have a slightly earlier log message saying > > 2006-12-15 16:14:14,789 - DEBUG from pywrapper.model: =20 > self._globalRefs=3D[u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/=20 > @about', u'http://rs.tdwg.org/ontology/voc/Test2#/MyElement', =20 > u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/RDF', u'http://=20 > www.w3.org/1999/02/22-rdf-syntax-ns#/MyRdfString'] > > So it looks to me like it is just getting the namespace of the =20 > attribute reference wrong and so not finding it in the globalRefs =20 > look up. It does it right for the element but not for the attribute. > > Looking at the code for _buildAttribute(self, attrs) on line 269 in =20= > structure_handler.py it doesn't mention namespace (unlike the =20 > _buildElement attribute) and it confuses me as it seems to pass the =20= > type as the namespace to the Attribute object it creates. > > Now this code all looks like clever stuff and I don't want to go =20 > trying to fix anything when I don't really know what I am doing - =20 > though I will have a go if no one else wants to. You may be able to =20= > fix this in minutes rather than my hours and would probably create =20 > fewer bugs . > > It may be that I am doing something bad in the XSD although I am =20 > pretty confident I am OK on that. > > Would once again be grateful for you comments, > > Roger > > > > > On 14 Dec 2006, at 10:48, Markus D=F6ring wrote: > >> Hi Roger, >> that's exactly what we were all thinking of doing for some time =20 >> already. Good finally someone DOES it! >> The xml schema parser inside pywrapper is a custom implementation. =20= >> I couldnt find any existing schema parser out there, honestly. So =20 >> as you can imagine this is a pretty tough job and I have tried it =20 >> with many different schemas and progressed in implementing xml =20 >> schema, but still dont support all of it (for example references =20 >> and patterns). >> >> Well, and your RDF schema is honestly the most complex I've seen =20 >> that was fed to pywrapper. >> So I tried to trace the problem and as you see pywrapper =20 >> complaints that the attribute http://rs.tdwg.org/ontology/voc/=20 >> TaxonName#/rdf:about is being referenced, but is nowhere defined. >> pywrapper expands all namespace prefixes into the full namespace. =20 >> So in this case http://rs.tdwg.org/ontology/voc/TaxonName# is the =20 >> targetnamespace of the imported lib/TaxonName.xsd schema file. So =20 >> in there I suspect is a reference to rdf:about, which pywrapper =20 >> thinks is an attribute name. I think this is because I cant find =20 >> anywhere the prefix rdf: being defined properly. I suspect oXygen =20 >> and alike know what rdf: means. So try to add a namespace =20 >> declaration to the schemas (for owl etc too). Then pywrapper =20 >> should expand rdf:about into the full qualified name http://=20 >> www.w3.org/1999/02/22-rdf-syntax-ns#about and hopefully find the =20 >> global declaration of rdf:about in the lib/rdf.xsd schema. >> >> But again, I think I've never tried a schema with that many =20 >> namespaces and imports so I keep my fingers crossed... >> >> Please let me know what happens! >> Markus >> >> >> >> On Dec 13, 2006, at 11:29 PM, Roger Hyam wrote: >> >>> Hi All, >>> >>> I am looking at what TAPIR output models I could use with =20 >>> PyWrapper. I have developed XML Schemas that will help produce =20 >>> valid RDF instance data for a simple OWL ontology. Here is an =20 >>> example: >>> >>> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd >>> >>> If you open this link in OxygenXML or Spy you can expand all the =20 >>> nodes and create instance documents that look like valid RDF. =20 >>> Here is an example instance document: >>> >>> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/template.xml >>> >>> So the plan would be to use the schema above (or something =20 >>> similar) as the structure in an output model so that a TAPIR =20 >>> response could be a valid semantic web document and a LSID =20 >>> metadata response. A complete LSID authority would need very =20 >>> little code on top of this. >>> >>> The downside is that these schemas are complex because of the =20 >>> number of imports required to support the different namespaces =20 >>> involved. >>> >>> Anyhow. The first step was to check that PyWrapper would parse =20 >>> schemas like the one above so I did this: >>> >>> http://localhost:8080/pywrapper/pywrapper?=20 >>> op=3Dschema&location=3Dhttp://rs.tdwg.org/ontology/voc/xsd/TaxonName/=20= >>> schema.xsd >>> >>> on my local machine and got >>> >>> "The models response structure is invalid: Global element =20 >>> reference 'http://rs.tdwg.org/ontology/voc/TaxonName#/rdf:about' =20 >>> missing" >>> >>> I am not sure why I get this as OxygenXML doesn't have a problem =20 >>> with expanding the links and validating the rdf:about attribute =20 >>> so I *think* the schema is OK. The parser is handling the import =20 >>> of TaxonName.xsd OK. Is it a problem with attributes? Is it a bug =20= >>> or a known limitation or an error in my schema? >>> >>> The are also problems with the group element but I can always =20 >>> work round this by just repeating the element. >>> >>> Any ideas on the rdf:about problem would be most welcome. >>> >>> Many thanks, >>> >>> Roger >>> >>> >>> >>> >>> >>> **************************************** >>> Roger Hyam <ro...@td...> >>> Biodiversity Information Standards >>> **************************************** >>> >>> >>> --------------------------------------------------------------------=20= >>> ----- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to =20= >>> share your >>> opinions on IT & business topics through brief surveys - and earn =20= >>> cash >>> http://www.techsay.com/default.php?=20 >>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV__________________________= ____=20 >>> _________________ >>> PyWrapper-devel mailing list >>> PyW...@li... >>> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >> > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________= ____=20 > _______________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: <m.d...@bg...> - 2006-12-18 12:28:48
|
good investigation roger, it looks just like you say. I will try to fix it to work with =20 attributes. Will be back in some minutes.... markus On Dec 15, 2006, at 5:32 PM, Roger Hyam wrote: > Thanks for the kind words Markus. I'm glad some one is glad I am =20 > trying to do this ;) I hope it doesn't end up with too much work =20 > for you. > > I have narrowed down this problem to a simple test case. > > This is a more simple XSD with a single import and it works fine: > > http://localhost:8080/pywrapper/pywrapper?op=3Dschema&location=3Dhttp://= =20 > rs.tdwg.org/ontology/voc/xsd/test1.xsd > > The second version is just the same but includes the use of an =20 > attribute reference in the imported file: > > http://localhost:8080/pywrapper/pywrapper?op=3Dschema&location=3Dhttp://= =20 > rs.tdwg.org/ontology/voc/xsd/test1_broken.xsd > > and it doesn't work! > > Looking at the logs > > The error message is > > "PyWrapperError: Global element reference 'http://rs.tdwg.org/=20 > ontology/voc/Test2#/rdf:about' missing" > > But we have a slightly earlier log message saying > > 2006-12-15 16:14:14,789 - DEBUG from pywrapper.model: =20 > self._globalRefs=3D[u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/=20 > @about', u'http://rs.tdwg.org/ontology/voc/Test2#/MyElement', =20 > u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/RDF', u'http://=20 > www.w3.org/1999/02/22-rdf-syntax-ns#/MyRdfString'] > > So it looks to me like it is just getting the namespace of the =20 > attribute reference wrong and so not finding it in the globalRefs =20 > look up. It does it right for the element but not for the attribute. > > Looking at the code for _buildAttribute(self, attrs) on line 269 in =20= > structure_handler.py it doesn't mention namespace (unlike the =20 > _buildElement attribute) and it confuses me as it seems to pass the =20= > type as the namespace to the Attribute object it creates. > > Now this code all looks like clever stuff and I don't want to go =20 > trying to fix anything when I don't really know what I am doing - =20 > though I will have a go if no one else wants to. You may be able to =20= > fix this in minutes rather than my hours and would probably create =20 > fewer bugs . > > It may be that I am doing something bad in the XSD although I am =20 > pretty confident I am OK on that. > > Would once again be grateful for you comments, > > Roger > > > > > On 14 Dec 2006, at 10:48, Markus D=F6ring wrote: > >> Hi Roger, >> that's exactly what we were all thinking of doing for some time =20 >> already. Good finally someone DOES it! >> The xml schema parser inside pywrapper is a custom implementation. =20= >> I couldnt find any existing schema parser out there, honestly. So =20 >> as you can imagine this is a pretty tough job and I have tried it =20 >> with many different schemas and progressed in implementing xml =20 >> schema, but still dont support all of it (for example references =20 >> and patterns). >> >> Well, and your RDF schema is honestly the most complex I've seen =20 >> that was fed to pywrapper. >> So I tried to trace the problem and as you see pywrapper =20 >> complaints that the attribute http://rs.tdwg.org/ontology/voc/=20 >> TaxonName#/rdf:about is being referenced, but is nowhere defined. >> pywrapper expands all namespace prefixes into the full namespace. =20 >> So in this case http://rs.tdwg.org/ontology/voc/TaxonName# is the =20 >> targetnamespace of the imported lib/TaxonName.xsd schema file. So =20 >> in there I suspect is a reference to rdf:about, which pywrapper =20 >> thinks is an attribute name. I think this is because I cant find =20 >> anywhere the prefix rdf: being defined properly. I suspect oXygen =20 >> and alike know what rdf: means. So try to add a namespace =20 >> declaration to the schemas (for owl etc too). Then pywrapper =20 >> should expand rdf:about into the full qualified name http://=20 >> www.w3.org/1999/02/22-rdf-syntax-ns#about and hopefully find the =20 >> global declaration of rdf:about in the lib/rdf.xsd schema. >> >> But again, I think I've never tried a schema with that many =20 >> namespaces and imports so I keep my fingers crossed... >> >> Please let me know what happens! >> Markus >> >> >> >> On Dec 13, 2006, at 11:29 PM, Roger Hyam wrote: >> >>> Hi All, >>> >>> I am looking at what TAPIR output models I could use with =20 >>> PyWrapper. I have developed XML Schemas that will help produce =20 >>> valid RDF instance data for a simple OWL ontology. Here is an =20 >>> example: >>> >>> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd >>> >>> If you open this link in OxygenXML or Spy you can expand all the =20 >>> nodes and create instance documents that look like valid RDF. =20 >>> Here is an example instance document: >>> >>> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/template.xml >>> >>> So the plan would be to use the schema above (or something =20 >>> similar) as the structure in an output model so that a TAPIR =20 >>> response could be a valid semantic web document and a LSID =20 >>> metadata response. A complete LSID authority would need very =20 >>> little code on top of this. >>> >>> The downside is that these schemas are complex because of the =20 >>> number of imports required to support the different namespaces =20 >>> involved. >>> >>> Anyhow. The first step was to check that PyWrapper would parse =20 >>> schemas like the one above so I did this: >>> >>> http://localhost:8080/pywrapper/pywrapper?=20 >>> op=3Dschema&location=3Dhttp://rs.tdwg.org/ontology/voc/xsd/TaxonName/=20= >>> schema.xsd >>> >>> on my local machine and got >>> >>> "The models response structure is invalid: Global element =20 >>> reference 'http://rs.tdwg.org/ontology/voc/TaxonName#/rdf:about' =20 >>> missing" >>> >>> I am not sure why I get this as OxygenXML doesn't have a problem =20 >>> with expanding the links and validating the rdf:about attribute =20 >>> so I *think* the schema is OK. The parser is handling the import =20 >>> of TaxonName.xsd OK. Is it a problem with attributes? Is it a bug =20= >>> or a known limitation or an error in my schema? >>> >>> The are also problems with the group element but I can always =20 >>> work round this by just repeating the element. >>> >>> Any ideas on the rdf:about problem would be most welcome. >>> >>> Many thanks, >>> >>> Roger >>> >>> >>> >>> >>> >>> **************************************** >>> Roger Hyam <ro...@td...> >>> Biodiversity Information Standards >>> **************************************** >>> >>> >>> --------------------------------------------------------------------=20= >>> ----- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to =20= >>> share your >>> opinions on IT & business topics through brief surveys - and earn =20= >>> cash >>> http://www.techsay.com/default.php?=20 >>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV__________________________= ____=20 >>> _________________ >>> PyWrapper-devel mailing list >>> PyW...@li... >>> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >> > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________= ____=20 > _______________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: Roger H. <ro...@td...> - 2006-12-15 16:33:00
|
Thanks for the kind words Markus. I'm glad some one is glad I am =20 trying to do this ;) I hope it doesn't end up with too much work for =20 you. I have narrowed down this problem to a simple test case. This is a more simple XSD with a single import and it works fine: http://localhost:8080/pywrapper/pywrapper?op=3Dschema&location=3Dhttp://=20= rs.tdwg.org/ontology/voc/xsd/test1.xsd The second version is just the same but includes the use of an =20 attribute reference in the imported file: http://localhost:8080/pywrapper/pywrapper?op=3Dschema&location=3Dhttp://=20= rs.tdwg.org/ontology/voc/xsd/test1_broken.xsd and it doesn't work! Looking at the logs The error message is "PyWrapperError: Global element reference 'http://rs.tdwg.org/=20 ontology/voc/Test2#/rdf:about' missing" But we have a slightly earlier log message saying 2006-12-15 16:14:14,789 - DEBUG from pywrapper.model: =20 self._globalRefs=3D[u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/=20 @about', u'http://rs.tdwg.org/ontology/voc/Test2#/MyElement', =20 u'http://www.w3.org/1999/02/22-rdf-syntax-ns#/RDF', u'http://=20 www.w3.org/1999/02/22-rdf-syntax-ns#/MyRdfString'] So it looks to me like it is just getting the namespace of the =20 attribute reference wrong and so not finding it in the globalRefs =20 look up. It does it right for the element but not for the attribute. Looking at the code for _buildAttribute(self, attrs) on line 269 in =20 structure_handler.py it doesn't mention namespace (unlike the =20 _buildElement attribute) and it confuses me as it seems to pass the =20 type as the namespace to the Attribute object it creates. Now this code all looks like clever stuff and I don't want to go =20 trying to fix anything when I don't really know what I am doing - =20 though I will have a go if no one else wants to. You may be able to =20 fix this in minutes rather than my hours and would probably create =20 fewer bugs . It may be that I am doing something bad in the XSD although I am =20 pretty confident I am OK on that. Would once again be grateful for you comments, Roger On 14 Dec 2006, at 10:48, Markus D=F6ring wrote: > Hi Roger, > that's exactly what we were all thinking of doing for some time =20 > already. Good finally someone DOES it! > The xml schema parser inside pywrapper is a custom implementation. =20 > I couldnt find any existing schema parser out there, honestly. So =20 > as you can imagine this is a pretty tough job and I have tried it =20 > with many different schemas and progressed in implementing xml =20 > schema, but still dont support all of it (for example references =20 > and patterns). > > Well, and your RDF schema is honestly the most complex I've seen =20 > that was fed to pywrapper. > So I tried to trace the problem and as you see pywrapper complaints =20= > that the attribute http://rs.tdwg.org/ontology/voc/TaxonName#/=20 > rdf:about is being referenced, but is nowhere defined. > pywrapper expands all namespace prefixes into the full namespace. =20 > So in this case http://rs.tdwg.org/ontology/voc/TaxonName# is the =20 > targetnamespace of the imported lib/TaxonName.xsd schema file. So =20 > in there I suspect is a reference to rdf:about, which pywrapper =20 > thinks is an attribute name. I think this is because I cant find =20 > anywhere the prefix rdf: being defined properly. I suspect oXygen =20 > and alike know what rdf: means. So try to add a namespace =20 > declaration to the schemas (for owl etc too). Then pywrapper should =20= > expand rdf:about into the full qualified name http://www.w3.org/=20 > 1999/02/22-rdf-syntax-ns#about and hopefully find the global =20 > declaration of rdf:about in the lib/rdf.xsd schema. > > But again, I think I've never tried a schema with that many =20 > namespaces and imports so I keep my fingers crossed... > > Please let me know what happens! > Markus > > > > On Dec 13, 2006, at 11:29 PM, Roger Hyam wrote: > >> Hi All, >> >> I am looking at what TAPIR output models I could use with =20 >> PyWrapper. I have developed XML Schemas that will help produce =20 >> valid RDF instance data for a simple OWL ontology. Here is an =20 >> example: >> >> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd >> >> If you open this link in OxygenXML or Spy you can expand all the =20 >> nodes and create instance documents that look like valid RDF. Here =20= >> is an example instance document: >> >> http://rs.tdwg.org/ontology/voc/xsd/TaxonName/template.xml >> >> So the plan would be to use the schema above (or something =20 >> similar) as the structure in an output model so that a TAPIR =20 >> response could be a valid semantic web document and a LSID =20 >> metadata response. A complete LSID authority would need very =20 >> little code on top of this. >> >> The downside is that these schemas are complex because of the =20 >> number of imports required to support the different namespaces =20 >> involved. >> >> Anyhow. The first step was to check that PyWrapper would parse =20 >> schemas like the one above so I did this: >> >> http://localhost:8080/pywrapper/pywrapper?=20 >> op=3Dschema&location=3Dhttp://rs.tdwg.org/ontology/voc/xsd/TaxonName/=20= >> schema.xsd >> >> on my local machine and got >> >> "The models response structure is invalid: Global element =20 >> reference 'http://rs.tdwg.org/ontology/voc/TaxonName#/rdf:about' =20 >> missing" >> >> I am not sure why I get this as OxygenXML doesn't have a problem =20 >> with expanding the links and validating the rdf:about attribute so =20= >> I *think* the schema is OK. The parser is handling the import of =20 >> TaxonName.xsd OK. Is it a problem with attributes? Is it a bug or =20 >> a known limitation or an error in my schema? >> >> The are also problems with the group element but I can always work =20= >> round this by just repeating the element. >> >> Any ideas on the rdf:about problem would be most welcome. >> >> Many thanks, >> >> Roger >> >> >> >> >> >> **************************************** >> Roger Hyam <ro...@td...> >> Biodiversity Information Standards >> **************************************** >> >> >> ---------------------------------------------------------------------=20= >> ---- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to =20 >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php?=20 >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV___________________________= ____=20 >> ________________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > |
From: <m.d...@bg...> - 2006-12-14 16:16:12
|
Hi Marc, all your warnings are fine. no problem at all. All tapir models listed in the ConceptNameServer alias.txt file are parsed when the server starts and the schema tags unknown to pywrapper are listed in the warnings in the terminal. But that is no problem, cause all of them are only used to restrict xsd:string. Maybe it was not the best idea to push them through to the terminal. They are all caught in the CNS.log file too and maybe that would have been enough. well, for now ignore REQ_STRUCTURE_UNKOWN_SCHEMA_TAG please! So you should see the webapplications at http://localhost/pywrapper What do you get? And you DONT need modify the port setting in several places. I am not sure what start_server.bat is, but thats not part of the regular distribution. You can simply give the desired port as an argument to the start_server.py script. just like this: %> python start_server.py 8082 OR modify the webapp.cfg to change the default port of pywrapper. And I've got one more wish: Please dont document "hacks" as a regular way to install pywrapper. Its not meant to be that way. Usually its just a misunderstanding - or a real bug in which case we should patch the code and not include hacks in the documentation! Thanks, Markus On Dec 14, 2006, at 3:49 PM, Marc Brugman wrote: > Hi, > > Can anyone help me here? I am trying to install the new PyWrapper > 3.0.0 (the tar.gz version) in Windows XP and I am getting all these > warnings, and in the end I am not able to connect to the website: > > <blaaaa.jpg> > > I have talked to Wouter about this. He used Subversion to download > the 3.0.0 version, which also gives him these warnings but at least > he is able to connect to the website. > > I have changed the port number to 8082 in the webapp.cfg and > config.ini, and I have adapted a start_server.bat from an earlier > version also to start the server from port 8082. > > Furthermore I created a log directory as this was missing with the > appropriate logfiles and I delete all the .pyc files. > > By the way, all the things I am doing to install PyWrapper and the > needed libraries on Windows XP I am already putting in an > prelimenary installation document including screen shots of every > step. This is of course only the initial step towards the proper > installation documentation. I have attached it to this e-mail > however so that you can see what I have done. > > Any help would be greatly appriciated! > > Best wishes, > > Marc > ____________________________________________________________ > > ETI BioInformatics > > University of Amsterdam > Mauritskade 61 > 1092 AD Amsterdam > The Netherlands > Phone: +31 20 5257239 > Fax: +31 20 5257238 > Web: http://www.eti.uva.nl > ____________________________________________________________ > ETI facilitates the Netherlands GBIF Node: http://www.nlbif.nl > > ETI facilitates the Species2000 Annual Checklist (http:// > www.sp2000.org/) > Bezoek eens http://www.soortenbank.nl > ____________________________________________________________ > > > <blaaaa.jpg> > <Installatiehandleiding PyWrapper Engels.doc> |
From: <m.d...@BG...> - 2006-12-14 12:09:18
|
the 3.0 version is not much different (you know of the version trouble we had that explains the big gap). The biomoby support has changed and some configtool bits are different I guess. and probably some other small issues, but nothing big. if it works for you leave it. Are you simply renaming the C:/trunk folder? It might be needed to remove the .pyc files of python, cause they might cache absolute filepaths. in a hurry, markus On Dec 14, 2006, at 12:11 PM, Wouter Addink wrote: > Markus, > > Another issue: if I try to change the installation folder from "C:/ > trunk" into something nice, like "Pywrapper3", pywrapper does not > start anymore. Adjusting paths with the adjusting_path script does > not help, but that probably only updates the path to python. > > We have a 2.4 version by the way (got it from Javier at TDWG > meeting) which seems to work without problems. Are there any big > differences with the 3.0 version? If not, we would take that one > for connecting the Alterra database to GBIF (10M records). > > Wouter |
From: <m.d...@bg...> - 2006-12-14 10:49:41
|
Hi Roger, that's exactly what we were all thinking of doing for some time already. Good finally someone DOES it! The xml schema parser inside pywrapper is a custom implementation. I couldnt find any existing schema parser out there, honestly. So as you can imagine this is a pretty tough job and I have tried it with many different schemas and progressed in implementing xml schema, but still dont support all of it (for example references and patterns). Well, and your RDF schema is honestly the most complex I've seen that was fed to pywrapper. So I tried to trace the problem and as you see pywrapper complaints that the attribute http://rs.tdwg.org/ontology/voc/TaxonName#/ rdf:about is being referenced, but is nowhere defined. pywrapper expands all namespace prefixes into the full namespace. So in this case http://rs.tdwg.org/ontology/voc/TaxonName# is the targetnamespace of the imported lib/TaxonName.xsd schema file. So in there I suspect is a reference to rdf:about, which pywrapper thinks is an attribute name. I think this is because I cant find anywhere the prefix rdf: being defined properly. I suspect oXygen and alike know what rdf: means. So try to add a namespace declaration to the schemas (for owl etc too). Then pywrapper should expand rdf:about into the full qualified name http://www.w3.org/1999/02/22-rdf-syntax- ns#about and hopefully find the global declaration of rdf:about in the lib/rdf.xsd schema. But again, I think I've never tried a schema with that many namespaces and imports so I keep my fingers crossed... Please let me know what happens! Markus On Dec 13, 2006, at 11:29 PM, Roger Hyam wrote: > Hi All, > > I am looking at what TAPIR output models I could use with > PyWrapper. I have developed XML Schemas that will help produce > valid RDF instance data for a simple OWL ontology. Here is an example: > > http://rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd > > If you open this link in OxygenXML or Spy you can expand all the > nodes and create instance documents that look like valid RDF. Here > is an example instance document: > > http://rs.tdwg.org/ontology/voc/xsd/TaxonName/template.xml > > So the plan would be to use the schema above (or something similar) > as the structure in an output model so that a TAPIR response could > be a valid semantic web document and a LSID metadata response. A > complete LSID authority would need very little code on top of this. > > The downside is that these schemas are complex because of the > number of imports required to support the different namespaces > involved. > > Anyhow. The first step was to check that PyWrapper would parse > schemas like the one above so I did this: > > http://localhost:8080/pywrapper/pywrapper?op=schema&location=http:// > rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd > > on my local machine and got > > "The models response structure is invalid: Global element reference > 'http://rs.tdwg.org/ontology/voc/TaxonName#/rdf:about' missing" > > I am not sure why I get this as OxygenXML doesn't have a problem > with expanding the links and validating the rdf:about attribute so > I *think* the schema is OK. The parser is handling the import of > TaxonName.xsd OK. Is it a problem with attributes? Is it a bug or a > known limitation or an error in my schema? > > The are also problems with the group element but I can always work > round this by just repeating the element. > > Any ideas on the rdf:about problem would be most welcome. > > Many thanks, > > Roger > > > > > > **************************************** > Roger Hyam <ro...@td...> > Biodiversity Information Standards > **************************************** > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV________________________________ > _______________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: Roger H. <ro...@td...> - 2006-12-13 22:29:48
|
Hi All, I am looking at what TAPIR output models I could use with PyWrapper. I have developed XML Schemas that will help produce valid RDF instance data for a simple OWL ontology. Here is an example: http://rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd If you open this link in OxygenXML or Spy you can expand all the nodes and create instance documents that look like valid RDF. Here is an example instance document: http://rs.tdwg.org/ontology/voc/xsd/TaxonName/template.xml So the plan would be to use the schema above (or something similar) as the structure in an output model so that a TAPIR response could be a valid semantic web document and a LSID metadata response. A complete LSID authority would need very little code on top of this. The downside is that these schemas are complex because of the number of imports required to support the different namespaces involved. Anyhow. The first step was to check that PyWrapper would parse schemas like the one above so I did this: http://localhost:8080/pywrapper/pywrapper?op=schema&location=http:// rs.tdwg.org/ontology/voc/xsd/TaxonName/schema.xsd on my local machine and got "The models response structure is invalid: Global element reference 'http://rs.tdwg.org/ontology/voc/TaxonName#/rdf:about' missing" I am not sure why I get this as OxygenXML doesn't have a problem with expanding the links and validating the rdf:about attribute so I *think* the schema is OK. The parser is handling the import of TaxonName.xsd OK. Is it a problem with attributes? Is it a bug or a known limitation or an error in my schema? The are also problems with the group element but I can always work round this by just repeating the element. Any ideas on the rdf:about problem would be most welcome. Many thanks, Roger **************************************** Roger Hyam <ro...@td...> Biodiversity Information Standards **************************************** |
From: Roger H. <ro...@td...> - 2006-12-13 11:05:42
|
Thanks Markus, I already had the svn binaries so I just ran the install script and =20 (as if by magic) I now have a working PyWrapper installed. Brilliant! I guess I should not have tried to be clever and install it manually. Many thanks for your help. I can have fun playing now. All the best, Roger On 13 Dec 2006, at 10:16, Markus D=F6ring wrote: > Hi Roger, > sorry for my late reply, but I was ill for some days. > Shame on me, but I cant remember why python 2.5 was a problem. As far > as I remember one core foreign library, I think actually CherryPy had > problems. But I dont remember exactly. As soon as time permits I will > try to test pywrapper with python 2.5 again and see whats the > problem. Because of this the adapt_installation.py script assures > that only python 2.4 can be used. > > If you wanna use python 2.4 on the mac you can simply download it > form python.org and install it! if you want you can then relink /usr/ > bin/python to your custom installation. > > But if you dont need a system wide installation, the easiest way to > install pywrapper on a mac is to use the tools/install.sh script. > Download and uncompress pywrapper and run ./install.sh form the > terminal. This requires the subversion client though which is not > part of apples os x. you can find binaries here for example: http:// > metissian.com/projects/macosx/subversion/ > > The installer installs python2.4 and all the needed libraries. Give > it a try. > Markus > > > On Dec 11, 2006, at 7:05 PM, Roger Hyam wrote: > >> Hi All, >> >> I am installing PyWrapper on my shiny new MacBook and (possibly >> stupidly) have installed the latest version of Python (2.5). This is >> the 'The current production version' according to Python. >> >> I have hacked the adapt_installation.py and the start_server.py >> scripts so they don't complain about 2.5 and I now get as far as the >> web GUID. >> >> Next problem is to get the MySQL driver for 2.5 but before I do this >> I was wondering whether I am really wasting my time and would be >> better off rolling back to 2.4 if I want to have a usable (but not >> production) PyWrapper install to work with (I don't want to do major >> porting work). In other words are there known issues I am going to >> run into that are likely to be problematic. >> >> If I should roll back to 2.4 any idea how I do it under OS X? >> >> Thanks for your thoughts and help, >> >> Roger >> >> >> >> >> >> ---------------------------------------------------------------------=20= >> - >> --- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php? >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >> _______________________________________________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: <m.d...@bg...> - 2006-12-13 10:17:02
|
Hi Roger, sorry for my late reply, but I was ill for some days. Shame on me, but I cant remember why python 2.5 was a problem. As far as I remember one core foreign library, I think actually CherryPy had problems. But I dont remember exactly. As soon as time permits I will try to test pywrapper with python 2.5 again and see whats the problem. Because of this the adapt_installation.py script assures that only python 2.4 can be used. If you wanna use python 2.4 on the mac you can simply download it form python.org and install it! if you want you can then relink /usr/ bin/python to your custom installation. But if you dont need a system wide installation, the easiest way to install pywrapper on a mac is to use the tools/install.sh script. Download and uncompress pywrapper and run ./install.sh form the terminal. This requires the subversion client though which is not part of apples os x. you can find binaries here for example: http:// metissian.com/projects/macosx/subversion/ The installer installs python2.4 and all the needed libraries. Give it a try. Markus On Dec 11, 2006, at 7:05 PM, Roger Hyam wrote: > Hi All, > > I am installing PyWrapper on my shiny new MacBook and (possibly > stupidly) have installed the latest version of Python (2.5). This is > the 'The current production version' according to Python. > > I have hacked the adapt_installation.py and the start_server.py > scripts so they don't complain about 2.5 and I now get as far as the > web GUID. > > Next problem is to get the MySQL driver for 2.5 but before I do this > I was wondering whether I am really wasting my time and would be > better off rolling back to 2.4 if I want to have a usable (but not > production) PyWrapper install to work with (I don't want to do major > porting work). In other words are there known issues I am going to > run into that are likely to be problematic. > > If I should roll back to 2.4 any idea how I do it under OS X? > > Thanks for your thoughts and help, > > Roger > > > > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: Roger H. <ro...@td...> - 2006-12-12 18:51:18
|
Thanks Ram=F3n, I installed 1.2.0 but it doesn't seem to have made any difference. I =20 still get the same error messages. They look like XML parsing problems but I am not sure how to =20 investigate this further. I have re-installed lxml using easy_install =20= rather than the regular build. Doesn't make any difference. I'll sleep on it and see if I can think of anything. Thanks, Roger On 12 Dec 2006, at 12:23, Ram=F3n P=E9rez wrote: > Hi Roger, > > I had problems with the mysql-python-1.2.1 library and I solved my =20 > problem with the MySQL-python-1.2.0. > > Best regards, > > Ram=F3n. > > Roger Hyam escribi=F3: >> Hi All, >> >> Following up from my last post (under Python 2.5 on OS X 10.4). >> >> I installed the MySQL driver into Python and seem to have gone =20 >> backwards. >> >> On starting the cherrypy server I get a series of warnings: >> >> ./start_serv.py 8080 >> >> WARNING! from pywrapper.model: =20 >> REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct =20 >> 'pattern' encountered in line 1562. Ignored. >> >> WARNING! from pywrapper.model: =20 >> REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct =20 >> 'minlength' encountered in line 1364. Ignored. >> >> WARNING! from pywrapper.model: =20 >> REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct =20 >> 'whitespace' encountered in line 1365. Ignored. >> >> ... >> >> before the server actually kicks off. >> >> Configure PyWrapper v3.0.0 CherryPy server using /Users/rogerhyam/ =20= >> Documents/tdwg/pywrapper_3.0.0/pywrapper_3.0.0/config/webapp.cfg >> mounting PyWrapper webapps to /pywrapper >> run server on port 8080 >> start engine... >> >> >> When I go to the URL I get a 500 >> >> http://localhost:8080/pywrapper/ >> >> Traceback (most recent call last): >> File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ =20 >> pywrapper_3.0.0/lib/cherrypy/_cprequest.py", line 539, in respond >> cherrypy.response.body =3D self.handler() >> File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ =20 >> pywrapper_3.0.0/lib/cherrypy/_cprequest.py", line 110, in __call__ >> return self.callable(*self.args, **self.kwargs) >> File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ =20 >> pywrapper_3.0.0/webapp/root.py", line 48, in index >> datasources=3Dsorted(self.getDsaList()) >> File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ =20 >> pywrapper_3.0.0/webapp/page.py", line 95, in render >> return tmpl.serialize(output=3D'html') >> File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ =20 >> pywrapper_3.0.0/lib/kid/__init__.py", line 236, in serialize >> return serializer.serialize(self, encoding, fragment) >> File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ =20 >> pywrapper_3.0.0/lib/kid/serialization.py", line 51, in serialize >> text =3D list(self.generate(stream, encoding, fragment)) >> File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ =20 >> pywrapper_3.0.0/lib/kid/serialization.py", line 353, in generate >> yield "<" + qname.encode(encoding) >> LookupError: unknown encoding: utf-8 >> I am looking around in the code and googling to see if I am doing =20= >> anything dumb with the libraries - but they were all fine before. =20 >> The only thing I have done since the GUID was working (other than =20= >> install the MySQL package) was reboot the machine. >> >> If I run a Python shell and type 'foobar'.encode('utf-8') I get a =20= >> foobar echoed back to me so I guess my Python install is healthy. >> >> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) >> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin >> Type "help", "copyright", "credits" or "license" for more =20 >> information. >> >>> 'foobar'.encode('utf-8') >> 'foobar' >> >> I am a little stuck on this so any help would be most appreciated. >> >> Thanks, >> >> Roger >> >> >> >> ---------------------------------------------------------------------=20= >> ---- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to =20 >> share your >> opinions on IT & business topics through brief surveys - and earn =20 >> cash >> http://www.techsay.com/default.php?=20 >> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >> _______________________________________________ >> PyWrapper-devel mailing list >> PyW...@li... >> https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >> >> <rpperez.vcf> > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________= ____=20 > _______________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |
From: <rp...@in...> - 2006-12-12 12:23:41
|
Hi Roger, I had problems with the mysql-python-1.2.1 library and I solved my=20 problem with the MySQL-python-1.2.0. Best regards, Ram=F3n. Roger Hyam escribi=F3: > Hi All, > > Following up from my last post (under Python 2.5 on OS X 10.4). > > I installed the MySQL driver into Python and seem to have gone =20 > backwards. > > On starting the cherrypy server I get a series of warnings: > > ./start_serv.py 8080 > > WARNING! from pywrapper.model: =20 > REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct =20 > 'pattern' encountered in line 1562. Ignored. > > WARNING! from pywrapper.model: =20 > REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct =20 > 'minlength' encountered in line 1364. Ignored. > > WARNING! from pywrapper.model: =20 > REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct =20 > 'whitespace' encountered in line 1365. Ignored. > > ... > > before the server actually kicks off. > > Configure PyWrapper v3.0.0 CherryPy server using /Users/rogerhyam/=20 > Documents/tdwg/pywrapper_3.0.0/pywrapper_3.0.0/config/webapp.cfg > mounting PyWrapper webapps to /pywrapper > run server on port 8080 > start engine... > > > When I go to the URL I get a 500 > > http://localhost:8080/pywrapper/ > > Traceback (most recent call last): > File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/=20 > pywrapper_3.0.0/lib/cherrypy/_cprequest.py", line 539, in respond > cherrypy.response.body =3D self.handler() > File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/=20 > pywrapper_3.0.0/lib/cherrypy/_cprequest.py", line 110, in __call__ > return self.callable(*self.args, **self.kwargs) > File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/=20 > pywrapper_3.0.0/webapp/root.py", line 48, in index > datasources=3Dsorted(self.getDsaList()) > File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/=20 > pywrapper_3.0.0/webapp/page.py", line 95, in render > return tmpl.serialize(output=3D'html') > File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/=20 > pywrapper_3.0.0/lib/kid/__init__.py", line 236, in serialize > return serializer.serialize(self, encoding, fragment) > File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/=20 > pywrapper_3.0.0/lib/kid/serialization.py", line 51, in serialize > text =3D list(self.generate(stream, encoding, fragment)) > File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/=20 > pywrapper_3.0.0/lib/kid/serialization.py", line 353, in generate > yield "<" + qname.encode(encoding) > LookupError: unknown encoding: utf-8 > I am looking around in the code and googling to see if I am doing =20 > anything dumb with the libraries - but they were all fine before. The =20 > only thing I have done since the GUID was working (other than install =20 > the MySQL package) was reboot the machine. > > If I run a Python shell and type 'foobar'.encode('utf-8') I get a =20 > foobar echoed back to me so I guess my Python install is healthy. > > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> 'foobar'.encode('utf-8') > 'foobar' > > I am a little stuck on this so any help would be most appreciated. > > Thanks, > > Roger > > > > -----------------------------------------------------------------------= -- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share= your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > =20 |
From: Roger H. <ro...@td...> - 2006-12-12 12:12:07
|
Hi All, Following up from my last post (under Python 2.5 on OS X 10.4). I installed the MySQL driver into Python and seem to have gone backwards. On starting the cherrypy server I get a series of warnings: ./start_serv.py 8080 WARNING! from pywrapper.model: REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct 'pattern' encountered in line 1562. Ignored. WARNING! from pywrapper.model: REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct 'minlength' encountered in line 1364. Ignored. WARNING! from pywrapper.model: REQ_STRUCTURE_UNKNOWN_SCHEMA_TAG:::Unknown xml schema construct 'whitespace' encountered in line 1365. Ignored. ... before the server actually kicks off. Configure PyWrapper v3.0.0 CherryPy server using /Users/rogerhyam/ Documents/tdwg/pywrapper_3.0.0/pywrapper_3.0.0/config/webapp.cfg mounting PyWrapper webapps to /pywrapper run server on port 8080 start engine... When I go to the URL I get a 500 http://localhost:8080/pywrapper/ Traceback (most recent call last): File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ pywrapper_3.0.0/lib/cherrypy/_cprequest.py", line 539, in respond cherrypy.response.body = self.handler() File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ pywrapper_3.0.0/lib/cherrypy/_cprequest.py", line 110, in __call__ return self.callable(*self.args, **self.kwargs) File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ pywrapper_3.0.0/webapp/root.py", line 48, in index datasources=sorted(self.getDsaList()) File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ pywrapper_3.0.0/webapp/page.py", line 95, in render return tmpl.serialize(output='html') File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ pywrapper_3.0.0/lib/kid/__init__.py", line 236, in serialize return serializer.serialize(self, encoding, fragment) File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ pywrapper_3.0.0/lib/kid/serialization.py", line 51, in serialize text = list(self.generate(stream, encoding, fragment)) File "/Users/rogerhyam/Documents/tdwg/pywrapper_3.0.0/ pywrapper_3.0.0/lib/kid/serialization.py", line 353, in generate yield "<" + qname.encode(encoding) LookupError: unknown encoding: utf-8 I am looking around in the code and googling to see if I am doing anything dumb with the libraries - but they were all fine before. The only thing I have done since the GUID was working (other than install the MySQL package) was reboot the machine. If I run a Python shell and type 'foobar'.encode('utf-8') I get a foobar echoed back to me so I guess my Python install is healthy. Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 'foobar'.encode('utf-8') 'foobar' I am a little stuck on this so any help would be most appreciated. Thanks, Roger |