Embedding custom XML into XMP

Discussion in 'XML' started by Paul J. Lucas, Jan 31, 2007.

  1. 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
     
    Paul J. Lucas, Jan 31, 2007
    #1
    1. Advertising

  2. Paul J. Lucas <> wrote:
    >
    > <rdf:Description xmlns:my="http://www.my.com/rdf:about="">


    Yes, I know that should be:

    > <rdf:Description xmlns:my="http://www.my.com/" rdf:about="">


    The original example was just a bad copy/paste job. The actual XML is
    correct.

    - Paul
     
    Paul J. Lucas, Jan 31, 2007
    #2
    1. Advertising

  3. Paul J. Lucas

    Andy Dingley Guest

    On 31 Jan, 16:53, (Paul J.
    Lucas) wrote:

    > 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.
     
    Andy Dingley, Jan 31, 2007
    #3
  4. Andy Dingley <> wrote:
    > On 31 Jan, 16:53, (Paul J.
    > Lucas) wrote:
    >
    > > So how can I embed any XML I want inside an XMP packet?

    >
    > I don't think you can.


    Then explain this:

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

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

    - Paul
     
    Paul J. Lucas, Jan 31, 2007
    #4
  5. Paul J. Lucas

    Andy Dingley Guest

    On 31 Jan, 20:32, (Paul J.
    Lucas) wrote:

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

    >
    > > I don't think you can.


    > 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.
     
    Andy Dingley, Feb 1, 2007
    #5
  6. Andy Dingley <> wrote:
    > On 31 Jan, 20:32, (Paul J.
    > Lucas) wrote:
    >
    > > 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
     
    Paul J. Lucas, Feb 1, 2007
    #6
  7. In article <>,
    says...
    > 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?
     
    Grant Robertson, Feb 2, 2007
    #7
  8. Grant Robertson <> wrote:
    > In article <>,
    > says...
    > > 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?


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

    - Paul
     
    Paul J. Lucas, Feb 5, 2007
    #8
  9. Paul J. Lucas <> wrote:
    > Andy Dingley <> wrote:
    > > Read the XMP SDK (download from Adobe)
    > > In particular, p28 of XMPSpecification.pdf
    > >
    > > :> ? The rdf:parseType='Literal' attribute is not supported.

    >
    > 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
     
    Paul J. Lucas, Feb 5, 2007
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. WJ

    XMP content and POST ?

    WJ, Mar 3, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    420
    Joerg Jooss
    Mar 5, 2005
  2. Arnoud Oortwijk

    Wrapping text between <xmp>

    Arnoud Oortwijk, Oct 23, 2003, in forum: HTML
    Replies:
    1
    Views:
    1,197
    Steve Pugh
    Oct 23, 2003
  3. AspProgrammer

    xmp in asp or in asp.net

    AspProgrammer, May 9, 2005, in forum: XML
    Replies:
    1
    Views:
    460
    Martin Honnen
    May 10, 2005
  4. Davide

    Adobe XMP in Java

    Davide, May 23, 2006, in forum: Java
    Replies:
    0
    Views:
    588
    Davide
    May 23, 2006
  5. Ivan Herman

    XMP in Python

    Ivan Herman, May 28, 2004, in forum: Python
    Replies:
    0
    Views:
    433
    Ivan Herman
    May 28, 2004
Loading...

Share This Page