Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDF/XML Blank node not parsing properly. #22

Closed
muninn opened this issue Feb 16, 2012 · 3 comments
Closed

RDF/XML Blank node not parsing properly. #22

muninn opened this issue Feb 16, 2012 · 3 comments

Comments

@muninn
Copy link

muninn commented Feb 16, 2012

When loading rdf/xml like:

...
<documents:jurisdiction rdf:resource="http://rdf.muninn-project.org/ontologies/documents#US_Copyright_Act_of_1909"/>
documents:date_published
<time:before rdf:parseType="http://www.w3.org/2001/XMLSchema#gYear">1920/time:before
/documents:date_published
...

with

$parser->parse(the_file.rdf);

generates

...
<ns0:jurisdiction rdf:resource="http://rdf.muninn-project.org/ontologies/documents#US_Copyright_Act_of_1909"/>
<ns0:date_published rdf:nodeID="arce720b1"/>
/rdf:Description

<rdf:Description rdf:nodeID="arce720b1">
<rdf:type rdf:resource="http://www.w3.org/2006/time#before"/>
/rdf:Description

The '1920' and gdate are lost lost.

Interestingly, parsing of "rdf:parseType" is case sensitive and the parsers drops information unless 'parsetype' is in lower case:

<documents:Image rdf:about="http://rdf.muninn-project.org/ww1/2011/11/11/Image/e73684a85eda5e96189b2cff8c85d814">
<documents:date_retrieved rdf:parseType="http://www.w3.org/2001/XMLSchema#date">20120215/documents:date_retrieved
/documents:Image

get munged to

<rdf:Description rdf:about="http://rdf.muninn-project.org/ww1/2011/11/11/Image/e73684a85eda5e96189b2cff8c85d814">
<rdf:type rdf:resource="http://rdf.muninn-project.org/ontologies/documents#Image"/>
/rdf:Description

but

<documents:Image rdf:about="http://rdf.muninn-project.org/ww1/2011/11/11/Image/e73684a85eda5e96189b2cff8c85d814">
<documents:date_retrieved rdf:parsetype="http://www.w3.org/2001/XMLSchema#date">20120215/documents:date_retrieved
/documents:Image

gives

<rdf:Description rdf:about="http://rdf.muninn-project.org/ww1/2011/11/11/Image/e73684a85eda5e96189b2cff8c85d814">
<rdf:type rdf:resource="http://rdf.muninn-project.org/ontologies/documents#Image"/>
ns0:date_retrieved20120215/ns0:date_retrieved
/rdf:Description

I haven't tracked down what makes the date datatype disappear but that seems to be another issue.

@semsol
Copy link
Owner

semsol commented Feb 16, 2012

rdf:parseType is a reserved attribute that can take the values "Resource", "Literal", or "Collection". Do you perhaps mean rdf:datatype?

@semsol semsol closed this as completed Feb 16, 2012
@muninn
Copy link
Author

muninn commented Feb 16, 2012

Had Brain Fart, sorry about this.

@bnowack
Copy link
Collaborator

bnowack commented Feb 17, 2012

heh, no worries :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants