Empty elements in rdf:Seq


i'm maintainer of libexiv2 uses xmpsdk manage xmp.  exiv2 library , command-line utility read/write/insert/delete metadata in images.  has support exif, iptc, xmp , icc profiles.
empty elements in rdf:seq - exiv2

 

one of our users has asked accessing empty li elements in seq.  here's xmp:

<?xpacket begin="" id="w5m0mpcehihzreszntczkc9d"?>

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp core 4.4.0-exiv2">

<rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

  <rdf:description rdf:about="" xmlns:darktable="http://darktable.sf.net/" >

   <darktable:multi_name>

    <rdf:seq>

     <rdf:li>foo</rdf:li>

     <rdf:li>bar</rdf:li>

     <rdf:li/>

     <rdf:li>baz</rdf:li>

    </rdf:seq>

   </darktable:multi_name>

  </rdf:description>

</rdf:rdf>

</x:xmpmeta>

<?xpacket end="w"?>

 

when read latest version of xmpsdk, here's output.

553 rmills@rmillsmbp:~/gnu/xmpsdk/xmp-toolkit-sdk-cc201607 $ samples/target/macintosh/intel_64/release/readingxmp ~/downloads/crash.xmp

no smart handler available /users/rmills/downloads/crash.xmp

trying packet scanning.

 

/users/rmills/downloads/crash.xmp opened successfully

dc:title in english =

dc:title in french =

 

xmp dumped xmpdump.txt

554 rmills@rmillsmbp:~/gnu/xmpsdk/xmp-toolkit-sdk-cc201607 $ cat xmpdump.txt

 

dumping xmpmeta object "" (0x0)

 

  darktable: http://darktable.sf.net/ (0x80000000 : schema)

  darktable:multi_name (0x600 : isordered isarray)

  [1] = "foo"

  [2] = "bar"

  [3] = "baz"

555 rmills@rmillsmbp:~/gnu/xmpsdk/xmp-toolkit-sdk-cc201607 $

 

as can see, xmpsdk ignores <rdf:li/> tag.  can see nothing in xmp specs or w3c/rdf specs if empty <rdf:li/> tag legal or illegal. 


it seems strange store empty element in seq, when obvious tag such <rdf:li>empty</rdf:li> explicit , read xmpsdk.


can comment this?

 

 

exiv2logo.png

hi clanmills

when xmp parser parses given rdf, ignores empty elements. internal representation of rdf generated xmp sdk has no empty element. not in case of array element, if give empty array input, same phenomenon happen.

now when xmp serialize rdf output, pretty clear empty elements not there lost while parsing.

empty elements of no significance , not contain information. there no point in storing them , processing them give output. hence xmp goes above mentioned approach



More discussions in XMP SDK


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop