Embedding custom XML into XMP

P

Paul J. Lucas

If I want to embed my own XML inside XMP, as far as I can tell, I should
do something like this:

<?xpacket begin="" id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:my="http://www.my.com/rdf:about="">
<my:Envelope rdf:parseType="Literal">
<foo bar="baz">anything I want</foo>
</my:Envelope>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>

Yet when I embed such XML inside a TIFF file having tag 700 and open the
TIFF with Photoshop, Photohop complains that the information is wrong (but
doesn't say specifically what) and ignores it.

So how can I embed any XML I want inside an XMP packet?

- Paul
 
A

Andy Dingley

So how can I embed any XML I want inside an XMP packet?

I don't think you can. XMP is a very-much subsetted RDF and it doesn't
like anything beyond a simple list of properties, certainly not any
sort of structured graph. As a result I've never really bothered with
it and sadly can't help further. Adobe do have a good specification of
it out on the web though and AFAIR they're quite specific about what
you can and can't do.
 
A

Andy Dingley

Then explain this:
http://www.w3.org/TR/rdf-primer/#xmlliterals

The example shows arbitrary XHTML embedded inside the dc:title element.

Lovely. That's RDF not XMP. Like I said, XMP only supports a _subset_
of RDF. That's one of the main reasons why I see XMP as a trivial
irrelevance to anything I work on. If I deal with it, it will only be
as an obsolete minor export format (like RSS 2.0) that I down-convert
into from the real data model.

Read the XMP SDK (download from Adobe)
In particular, p28 of XMPSpecification.pdf

:> RDF Issues
:> Unsupported Features
:> XMP uses a subset of RDF. Valid XMP is limited to the RDF described
in the previous
:> sections, along with all equivalent alternate forms of that RDF.
:> [...]
:> â— The rdf:parseType='Literal' attribute is not supported.
 
P

Paul J. Lucas

Andy Dingley said:
Then explain this:
http://www.w3.org/TR/rdf-primer/#xmlliterals

The example shows arbitrary XHTML embedded inside the dc:title element.

Read the XMP SDK (download from Adobe)
In particular, p28 of XMPSpecification.pdf

:> RDF Issues
:> Unsupported Features
:> XMP uses a subset of RDF. Valid XMP is limited to the RDF described
in the previous
:> sections, along with all equivalent alternate forms of that RDF.
:> [...]
:> ? The rdf:parseType='Literal' attribute is not supported.

Arrrgh!!!!! :-(

- Paul
 
G

Grant Robertson

Lovely. That's RDF not XMP. Like I said, XMP only supports a _subset_
of RDF. That's one of the main reasons why I see XMP as a trivial
irrelevance to anything I work on. If I deal with it, it will only be
as an obsolete minor export format (like RSS 2.0) that I down-convert
into from the real data model.
So, if I were creating a standard, then allowing XMP to be used to
provide information about images would be wise but allowing only XMP and
nothing else would be unwise?
 
P

Paul J. Lucas

Grant Robertson said:
So, if I were creating a standard, then allowing XMP to be used to
provide information about images would be wise but allowing only XMP and
nothing else would be unwise?

Possibly. Because it's XML, it's easy to ignore what you don't understand.

- Paul
 
P

Paul J. Lucas

Paul J. Lucas said:
Arrrgh!!!!! :-(

It seems that Photoshop, at least, will accept my custom XML if I stuff
it inside of a CDATA section. It's a kludge, but it works.

- Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top