473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

rdf, xmp

I have to add access to some XMP data to an existing python
application.
XMP is built on RDF, RDF is built on XML.
I try to reuse as much of possible of existing code.
btw, dont mistake XMP (http://www.adobe.com/products/xmp/) with
XMPP (http://www.faqs.org/rfcs/rfc3920.html), backed by PyXMPP
(http://pyxmpp.jajcus.net/). XMP is adobe's standard for storing
metadata in files (jpg, pdf).
Are there people with the same concern out there?

It seemed logical to use existing rdf libraries. I found two, RDFLib
(http://rdflib.net) and pyrple (http://infomesh.net/pyrple/).
My first contact with RDFLib is disappointing: real intricate lib
(lot of modules, lot of methods), almost no documentation (an almost
empty Epydoc generated documentation frame), puzzling experiments.

I guess XMP uses a real tiny subset of RDF possibilities, and maybe
RDFLib is fine for ambitious design, but too heavy in this case?
Ill now dig a little on pyrple.
Feedback on these matters, please?
Dec 2 '06 #1
3 1647

Imbaud Pierre wrote:
I have to add access to some XMP data to an existing python
application.
XMP is built on RDF, RDF is built on XML.
RDF is _NOT_ built on top of XML. Thinking that it is causes a lot of
trouble in the architecture of big RDF projects. RDF is a data model,
not a serialisation. The data model is also a graph (more than XML can
cope with) and can span multiple documents. It's only RDF/XML that's
the serialisation of RDF into XML and good architectures start from
thinking about the RDF data model, not this RDF/XML serialisation.

As to RDF handling, then the usual toolset is Jena (in Java) and
Redland has a Python binding although Redland is fairly aged now.

I'm unfamiliar with XMP and won't have a chance to look at it until
Monday. However if XMP is strongly "XML like" despite claiming to be
RDF, then you might find that handling a pure XMP problem is quite
easily done with XML tools.

Famously RDF/XML is unprocessable with XSLT if it's sophisticated, but
quite easy if it's restricted to only a simple XML-like RDF model. XMP
could well be similar.

Dec 2 '06 #2
Andy Dingley a écrit :
Imbaud Pierre wrote:
>>I have to add access to some XMP data to an existing python
application.
XMP is built on RDF, RDF is built on XML.

RDF is _NOT_ built on top of XML. Thinking that it is causes a lot of
trouble in the architecture of big RDF projects. RDF is a data model,
not a serialisation. The data model is also a graph (more than XML can
cope with) and can span multiple documents. It's only RDF/XML that's
the serialisation of RDF into XML and good architectures start from
thinking about the RDF data model, not this RDF/XML serialisation.
Granted, I oversimplified, my statement was misleading. I tried to
help unknowledgeable reader understand what it was about.

As to RDF handling, then the usual toolset is Jena (in Java) and
Redland has a Python binding although Redland is fairly aged now.

I'm unfamiliar with XMP and won't have a chance to look at it until
Monday. However if XMP is strongly "XML like" despite claiming to be
RDF, then you might find that handling a pure XMP problem is quite
easily done with XML tools.
This was my wild guess: the data model I deal with (XMP data, I mean) is
hardly more than a bunch of key-value pairs - with control for
vocabulary, and some typing.

Famously RDF/XML is unprocessable with XSLT if it's sophisticated, but
quite easy if it's restricted to only a simple XML-like RDF model. XMP
could well be similar.
Still unclear.
Thanks for your help!
Dec 2 '06 #3

Imbaud Pierre wrote:
I have to add access to some XMP data to an existing python
application.
XMP is built on RDF,
I'm just looking at the XMP Spec from the Adobe SDK. First impressions
only, as I don't have time to read the whole thing in detail.

This spec doesn't inspire me with confidence as to its accuracy and
consistency. I think I've already seen some obscure conditions where
developers will be unable to unambiguously interpret the spec. Compared
to MPEG-7 however, at least it's not 700 pages long!

The spec does state that property values can be structured, which is
one of the best reasons to start using RDF for storing metadata.
However I think actual use of these would be minimal in "typical" XML
applicaations. At worst it's a simple data typing exercise of a
two-valued tuple for "dimensions", rather than separate height and
width properties. These are no problem to process.

In particular, the XMP data model is a single-rooted tree, i.e. there
is an external model of "a resource" (i.e. one image file) and an XMP
document only addresses a single "resource" at a time.

A major restriction in XMP is that it has no concept of shared
resources between properties (and it can't, as there's no rdf:ID or
rdf:about allowed). This is always hard to process, but it's also very
valuable for doing metadata. Imagine a series of wildlife images that
all refer to a particular safari, national park and species. We might
be able to share a species reference between images easily enough by
referring to a well-known public vocabulary, but it would also be
useful (and concise) to be able to define one "expedition" in a subject
property on one image, then share that same resource to others. As it
is, we'd have to duplicate the full definition. Even in XMP's "separate
document for each image resource" model we still might wish to do
something similar, such as both photographer and director being the
same person. When you start having 20MB+ of metadata per video
resource (been there, done that!) then this sort of duplication is a
huge problem. Not just because of the data volume, but because we need
to identify that referenced resources are identical, not merely havingg
the same in their property values (i.e. I'm the same John Smith, not
just two people with the same name).

There is no visible documentation of vocabularies, inetrnal or
external. Some pre-defined schemas are given that define property sets,
but there's nothing on the values of these, or how to describe that
values are being taken from a particular external vocabulary (you can
do this with RDF, but they don't describe it). This isn't widely seen
as important, except by people who've already been through large media
annotation projects.

It's RDF-like, not just XML. However it's also a subset of RDF - in
particular rdf:about isn't supported, which removes many of the graph
structure constructs that make RDF such a pain to process with the
basic XML tools. Read their explicit not on which RDF features aren't
supported -- they're enough to make XMP easily processable with XSLT.

The notes on embedding of XMP in XML and XML in XMP are both simplistic
and ugly.

I still don't see much _point_ in XMP. I could achieve all this much
with two cups of coffee, RDF and Dublin Core and a whiteboard pen.
Publishing metadata is good, publishing new _ways_ of publishing
metadata is very bad!
Overall, it could be far better, it could be better without being more
complicated, and it's at least 5 years behind industry best practice
for fields like museums and libraries. It's also a field that's still
so alien to media and creative industries that the poor description and
support of XMP will cause them to invent many bad architectures and
data models for a few years to come.

Dec 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.