texlive[50713] Master/texmf-dist: hyperxmp (2apr19)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 2 23:12:27 CEST 2019


Revision: 50713
          http://tug.org/svn/texlive?view=revision&revision=50713
Author:   karl
Date:     2019-04-02 23:12:27 +0200 (Tue, 02 Apr 2019)
Log Message:
-----------
hyperxmp (2apr19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/hyperxmp/README
    trunk/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf
    trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex
    trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
    trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty

Modified: trunk/Master/texmf-dist/doc/latex/hyperxmp/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hyperxmp/README	2019-04-02 21:12:09 UTC (rev 50712)
+++ trunk/Master/texmf-dist/doc/latex/hyperxmp/README	2019-04-02 21:12:27 UTC (rev 50713)
@@ -19,24 +19,20 @@
 
 hyperxmp integrates seamlessly with hyperref and requires virtually no
 modifications to documents that already exploit hyperref's mechanisms
-for specifying PDF metadata.  The current version of hyperxmp can
-embed the following metadata as XMP: authors, base URL, contact
-telephone number/postal address/email address/URL, copyright
-statement, creation date, document identifier, document instance
-identifier, document type, file format, keywords, language, LaTeX file
-name, license URL, metadata writer, PDF version, PDF-generating tool,
-PDF/A compliance level and version, primary author's position or
-title, subject/summary, and title.  hyperxmp is compatible with
-pdflatex, latex+dvips+ps2pdf, latex+dvipdfm, xelatex, and lualatex.
+for specifying PDF metadata.  hyperxmp can embed a wide variety of
+metadata as XMP, including the list of authors, document title,
+contact information (telephone number, postal address, email address,
+etc.), copyright statement, keywords, natural language, and much more.
+hyperxmp is compatible with pdflatex, latex+dvips+ps2pdf,
+latex+dvipdfm, xelatex, and lualatex.
 
-
 Installation
 ============
 
 To create hyperxmp.sty simply run "tex hyperxmp.ins".  Install
 hyperxmp.sty somewhere where LaTeX can find it.  See
-http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages for
-general information about installing packages.
+https://texfaq.org/FAQ-installthings for general information about
+installing packages.
 
 Building hyperxmp.pdf is a little more involved:
 

Modified: trunk/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex	2019-04-02 21:12:09 UTC (rev 50712)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex	2019-04-02 21:12:27 UTC (rev 50713)
@@ -8,208 +8,153 @@
 
 \begin{alltt}
     <?xpacket begin="\string\357\string\273\string\277" id="W5M0MpCehiHzreSzNTczkc9d"?>
-    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-702">
-       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-          <rdf:Description rdf:about=""
-               xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
-               <pdf:Keywords>
-                 \metavalue{energy quanta, Hertz effect, quantum physics}
-               </pdf:Keywords>
-               <pdf:Producer>\metavalue{pdfTeX-1.40.10}</pdf:Producer>
-          </rdf:Description>
-          <rdf:Description rdf:about=""
-               xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">
-             <xmpRights:Marked>\metavalue{True}</xmpRights:Marked>
-             <xmpRights:WebStatement>
-               \metavalue{http://creativecommons.org/licenses/by-nc-nd/3.0/}
-             </xmpRights:WebStatement>
-          </rdf:Description>
-          <rdf:Description rdf:about=""
-                xmlns:dc="http://purl.org/dc/elements/1.1/">
-             <dc:format>\metavalue{application/pdf}</dc:format>
-             <dc:title>
-                <rdf:Alt>
-                   <rdf:li xml:lang="en">
-                     \metavalue{On a heuristic viewpoint concerning the production and
-                     transformation of light}
-                   </rdf:li>
-                   <rdf:li xml:lang="x-default">
-                     \metavalue{On a heuristic viewpoint concerning the production and
-                     transformation of light}
-                   </rdf:li>
-                   <rdf:li xml:lang="de">
-                     \metavalue{\"Uber einen die Erzeugung und Verwandlung des Lichtes
-                     betreffenden heuristischen Gesichtspunkt}
-                   </rdf:li>
-                </rdf:Alt>
-             </dc:title>
-             <dc:description>
-                <rdf:Alt>
-                   <rdf:li xml:lang="en">\metavalue{photoelectric effect}</rdf:li>
-                   <rdf:li xml:lang="x-default">\metavalue{photoelectric effect}</rdf:li>
-                </rdf:Alt>
-             </dc:description>
-             <dc:rights>
-                <rdf:Alt>
-                   <rdf:li xml:lang="en">
-                     \metavalue{Copyright (C) 1905, Albert Einstein}
-                   </rdf:li>
-                   <rdf:li xml:lang="x-default">
-                     \metavalue{Copyright (C) 1905, Albert Einstein}
-                   </rdf:li>
-                </rdf:Alt>
-             </dc:rights>
-             <dc:creator>
-                <rdf:Seq>
-                   <rdf:li>\metavalue{Albert Einstein}</rdf:li>
-                </rdf:Seq>
-             </dc:creator>
-             <dc:subject>
-                <rdf:Bag>
-                   <rdf:li>\metavalue{energy quanta}</rdf:li>
-                   <rdf:li>\metavalue{Hertz effect}</rdf:li>
-                   <rdf:li>\metavalue{quantum physics}</rdf:li>
-                </rdf:Bag>
-             </dc:subject>
-             <dc:date>
-                <rdf:Seq>
-                   <rdf:li>\metavalue{1905-03-17}</rdf:li>
-                </rdf:Seq>
-             </dc:date>
-             <dc:language>
-                <rdf:Bag>
-                   <rdf:li>\metavalue{en}</rdf:li>
-                </rdf:Bag>
-              </dc:language>
-              <dc:type>
-                 <rdf:Bag>
-                    <rdf:li>\metavalue{Text}</rdf:li>
-                 </rdf:Bag>
-              </dc:type>
-             <dc:source>\metavalue{einstein.tex}</dc:source>
-          </rdf:Description>
-          <rdf:Description rdf:about=""
-                xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
-             <photoshop:AuthorsPosition>
-               \metavalue{Technical Assistant, Level III}
-             </photoshop:AuthorsPosition>
-             <photoshop:CaptionWriter>\metavalue{Scott Pakin}</photoshop:CaptionWriter>
-          </rdf:Description>
-          <rdf:Description rdf:about=""
-              xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
-              xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
-              xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"
-              xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#"
-              xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#">
-            <pdfaExtension:schemas>
-              <rdf:Bag>
-                <rdf:li rdf:parseType="Resource">
-                  <pdfaSchema:schema>IPTC Core Schema</pdfaSchema:schema>
-                  <pdfaSchema:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaSchema:namespaceURI>
-                  <pdfaSchema:prefix>Iptc4xmpCore</pdfaSchema:prefix>
-                  <pdfaSchema:property>
-                    <rdf:Seq>
-                      <rdf:li rdf:parseType="Resource">
-                        <pdfaProperty:name>CreatorContactInfo</pdfaProperty:name>
-                        <pdfaProperty:valueType>contactinfo</pdfaProperty:valueType>
-                        <pdfaProperty:category>external</pdfaProperty:category>
-                        <pdfaProperty:description>contact information for the document's creator</pdfaProperty:description>
-                      </rdf:li>
-                    </rdf:Seq>
-                  </pdfaSchema:property>
-                  <pdfaSchema:valueType>
-                    <rdf:Seq>
-                      <rdf:li rdf:parseType="Resource">
-                        <pdfaType:type>contactinfo</pdfaType:type>
-                        <pdfaType:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaType:namespaceURI>
-                        <pdfaType:prefix>Iptc4xmpCore</pdfaType:prefix>
-                        <pdfaType:description>contact information</pdfaType:description>
-                        <pdfaType:field>
-                          <rdf:Seq>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiAdrExtadr</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact address</pdfaField:description>
-                            </rdf:li>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiAdrCity</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact city</pdfaField:description>
-                            </rdf:li>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiAdrRegion</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact region</pdfaField:description>
-                            </rdf:li>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiAdrPcode</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact postal code</pdfaField:description>
-                            </rdf:li>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiAdrCtry</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact country</pdfaField:description>
-                            </rdf:li>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiTelWork</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact telephone number</pdfaField:description>
-                            </rdf:li>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiEmailWork</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact email address</pdfaField:description>
-                            </rdf:li>
-                            <rdf:li rdf:parseType="Resource">
-                              <pdfaField:name>CiUrlWork</pdfaField:name>
-                              <pdfaField:valueType>Text</pdfaField:valueType>
-                              <pdfaField:description>contact url</pdfaField:description>
-                            </rdf:li>
-                          </rdf:Seq>
-                        </pdfaType:field>
-                      </rdf:li>
-                    </rdf:Seq>
-                  </pdfaSchema:valueType>
-                </rdf:li>
-              </rdf:Bag>
-            </pdfaExtension:schemas>
-          </rdf:Description>
-          <rdf:Description rdf:about=""
-               xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/">
-           <Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">
-             <Iptc4xmpCore:CiAdrExtadr>\metavalue{Kramgasse 49}</Iptc4xmpCore:CiAdrExtadr>
-             <Iptc4xmpCore:CiAdrCity>\metavalue{Bern}</Iptc4xmpCore:CiAdrCity>
-             <Iptc4xmpCore:CiAdrPcode>\metavalue{3011}</Iptc4xmpCore:CiAdrPcode>
-             <Iptc4xmpCore:CiAdrCtry>\metavalue{Switzerland}</Iptc4xmpCore:CiAdrCtry>
-             <Iptc4xmpCore:CiTelWork>\metavalue{031 312 00 91}</Iptc4xmpCore:CiTelWork>
-             <Iptc4xmpCore:CiEmailWork>\metavalue{aeinstein at ipi.ch}</Iptc4xmpCore:CiEmailWork>
-             <Iptc4xmpCore:CiUrlWork>
-               \metavalue{http://einstein.biz/,
-               https://www.facebook.com/AlbertEinstein}
-             </Iptc4xmpCore:CiUrlWork>
-           </Iptc4xmpCore:CreatorContactInfo>
-          </rdf:Description>
-          <rdf:Description rdf:about=""
-                xmlns:xmp="http://ns.adobe.com/xap/1.0/">
-             <xmp:CreateDate>\metavalue{\todayISO}</xmp:CreateDate>
-             <xmp:ModifyDate>\metavalue{\todayISO}</xmp:ModifyDate>
-             <xmp:MetadataDate>\metavalue{\todayISO}</xmp:MetadataDate>
-             <xmp:CreatorTool>\metavalue{LaTeX with hyperref package}</xmp:CreatorTool>
-             <xmp:BaseURL>
-               \metavalue{http://mirror.ctan.org/macros/latex/contrib/hyperxmp/}
-             </xmp:BaseURL>
-          </rdf:Description>
-          <rdf:Description rdf:about=""
-                xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
-             <xmpMM:DocumentID>
-               \metavalue{uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0}
-             </xmpMM:DocumentID>
-             <xmpMM:InstanceID>
-               \metavalue{uuid:059b675f-2bb6-4262-80a3-9b6c9b6759b6}
-             </xmpMM:InstanceID>
-          </rdf:Description>
-       </rdf:RDF>
+    <x:xmpmeta xmlns:x="adobe:ns:meta/">
+      <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+        <rdf:Description rdf:about=""
+                         xmlns:pdf="http://ns.adobe.com/pdf/1.3/"
+                         xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"
+                         xmlns:dc="http://purl.org/dc/elements/1.1/"
+                         xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
+                         xmlns:xmp="http://ns.adobe.com/xap/1.0/"
+                         xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
+                         xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
+                         xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"
+                         xmlns:prism="http://prismstandard.org/namespaces/basic/3.0/"
+                         xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"
+                         xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
+                         xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
+                         xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"
+                         xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#"
+                         xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#">
+          <pdfaExtension:schemas>
+            <rdf:Bag>
+\end{alltt}
+\begin{center}
+  $\vdots$\par
+  \emph{[over 100 lines of boilerplate definitions not shown]}\par
+  $\vdots$\par
+\end{center}
+\begin{alltt}
+            </rdf:Bag>
+          </pdfaExtension:schemas>
+          <pdf:Keywords>
+            \metavalue{energy quanta, Hertz effect, quantum physics}
+          </pdf:Keywords>
+          <pdf:Producer>\metavalue{pdfTeX-1.40.19}</pdf:Producer>
+          <pdf:PDFVersion>\metavalue{1.5}</pdf:PDFVersion>
+          <xmpRights:Marked>\metavalue{True}</xmpRights:Marked>
+          <xmpRights:WebStatement>
+            \metavalue{http://creativecommons.org/licenses/by-nc-nd/3.0/}
+          </xmpRights:WebStatement>
+          <dc:format>\metavalue{application/pdf}</dc:format>
+          <dc:title>
+            <rdf:Alt>
+              <rdf:li xml:lang="en">
+                \metavalue{On a heuristic viewpoint concerning the production
+                and transformation of light}
+              </rdf:li>
+              <rdf:li xml:lang="x-default">
+                \metavalue{On a heuristic viewpoint concerning the production
+                and transformation of light}
+              </rdf:li>
+              <rdf:li xml:lang="de">
+                \metavalue{\"Uber einen die Erzeugung und Verwandlung des Lichtes
+                betreffenden heuristischen Gesichtspunkt}
+              </rdf:li>
+            </rdf:Alt>
+          </dc:title>
+          <dc:description>
+            <rdf:Alt>
+              <rdf:li xml:lang="en">\metavalue{photoelectric effect}</rdf:li>
+              <rdf:li xml:lang="x-default">\metavalue{photoelectric effect}</rdf:li>
+            </rdf:Alt>
+          </dc:description>
+          <dc:rights>
+            <rdf:Alt>
+              <rdf:li xml:lang="en">
+                \metavalue{Copyright (C) 1905, Albert Einstein}
+              </rdf:li>
+              <rdf:li xml:lang="x-default">
+                \metavalue{Copyright (C) 1905, Albert Einstein}
+              </rdf:li>
+            </rdf:Alt>
+          </dc:rights>
+          <dc:creator>
+            <rdf:Seq>
+              <rdf:li>\metavalue{Albert Einstein}</rdf:li>
+            </rdf:Seq>
+          </dc:creator>
+          <dc:subject>
+            <rdf:Bag>
+              <rdf:li>\metavalue{energy quanta}</rdf:li>
+              <rdf:li>\metavalue{Hertz effect}</rdf:li>
+              <rdf:li>\metavalue{quantum physics}</rdf:li>
+            </rdf:Bag>
+          </dc:subject>
+          <dc:date>
+            <rdf:Seq>
+              <rdf:li>\metavalue{1905-03-17}</rdf:li>
+            </rdf:Seq>
+          </dc:date>
+          <dc:language>
+            <rdf:Bag>
+              <rdf:li>\metavalue{en}</rdf:li>
+            </rdf:Bag>
+          </dc:language>
+          <dc:type>
+            <rdf:Bag>
+              <rdf:li>\metavalue{Text}</rdf:li>
+            </rdf:Bag>
+          </dc:type>
+          <dc:source>\metavalue{einstein.tex}</dc:source>
+          <photoshop:AuthorsPosition>
+            \metavalue{Technical Assistant, Level III}
+          </photoshop:AuthorsPosition>
+          <photoshop:CaptionWriter>\metavalue{Scott Pakin}</photoshop:CaptionWriter>
+          <xmp:CreateDate>\metavalue{2019-03-16T23:07:38-06:00}</xmp:CreateDate>
+          <xmp:ModifyDate>\metavalue{2019-03-16T23:07:38-06:00}</xmp:ModifyDate>
+          <xmp:MetadataDate>\metavalue{2019-03-16T23:07:38-06:00}</xmp:MetadataDate>
+          <xmp:CreatorTool>\metavalue{LaTeX with hyperref package}</xmp:CreatorTool>
+          <xmpMM:DocumentID>
+            \metavalue{uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0}
+          </xmpMM:DocumentID>
+          <xmpMM:InstanceID>
+            \metavalue{uuid:3e4c4182-b182-46c9-995f-754c41d13390}
+          </xmpMM:InstanceID>
+          <xmpMM:VersionID>\metavalue{2.998e8}</xmpMM:VersionID>
+          <Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">
+            <Iptc4xmpCore:CiAdrExtadr>\metavalue{Kramgasse 49}</Iptc4xmpCore:CiAdrExtadr>
+            <Iptc4xmpCore:CiAdrCity>\metavalue{Bern}</Iptc4xmpCore:CiAdrCity>
+            <Iptc4xmpCore:CiAdrPcode>\metavalue{3011}</Iptc4xmpCore:CiAdrPcode>
+            <Iptc4xmpCore:CiAdrCtry>\metavalue{Switzerland}</Iptc4xmpCore:CiAdrCtry>
+            <Iptc4xmpCore:CiTelWork>\metavalue{031 312 00 91}</Iptc4xmpCore:CiTelWork>
+            <Iptc4xmpCore:CiEmailWork>\metavalue{aeinstein at ipi.ch}</Iptc4xmpCore:CiEmailWork>
+            <Iptc4xmpCore:CiUrlWork>
+              \metavalue{http://einstein.biz/,}
+              \metavalue{https://www.facebook.com/AlbertEinstein}
+            </Iptc4xmpCore:CiUrlWork>
+          </Iptc4xmpCore:CreatorContactInfo>
+          <prism:complianceProfile>\metavalue{three}</prism:complianceProfile>
+          <prism:subtitle xml:lang="en-US">
+            \metavalue{Putting that bum Maxwell in his place}
+          </prism:subtitle>
+          <prism:publicationName xml:lang="de">
+            \metavalue{Annalen der Physik}
+          </prism:publicationName>
+          <prism:aggregationType>\metavalue{journal}</prism:aggregationType>
+          <prism:volume>\metavalue{322}</prism:volume>
+          <prism:number>\metavalue{6}</prism:number>
+          <prism:pageRange>\metavalue{132-148}</prism:pageRange>
+          <prism:issn>\metavalue{0003-3804}</prism:issn>
+          <prism:eIssn>\metavalue{1521-3889}</prism:eIssn>
+          <prism:doi>\metavalue{10.1002/andp.19053220607}</prism:doi>
+          <prism:url>
+            \metavalue{http://www.physik.uni-augsburg.de/annalen/history/einstein-papers/190517132-148.pdf}
+          </prism:url>
+          <prism:byteCount>\metavalue{56884}</prism:byteCount>
+          <prism:pageCount>\metavalue{17}</prism:pageCount>
+        </rdf:Description>
+      </rdf:RDF>
     </x:xmpmeta>
     <?xpacket end="w"?>
 \end{alltt}

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2019-04-02 21:12:09 UTC (rev 50712)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2019-04-02 21:12:27 UTC (rev 50713)
@@ -22,7 +22,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{hyperxmp}
 %<*package>
-    [2019/02/25 v3.5a Store hyperref metadata in XMP format]
+    [2019/03/31 v4.0 Store hyperref metadata in XMP format]
 %</package>
 %
 %<*driver>
@@ -38,7 +38,7 @@
 \usepackage{needspace}
 \usepackage{varioref}
 \usepackage{alltt}
-\usepackage{needspace}
+\usepackage{multicol}
 \usepackage[utf8]{inputenc}
 \usepackage{hyperxmp}
 \usepackage[unicode,bookmarksopen,bookmarksopenlevel=2,bookmarksnumbered]{hyperref}
@@ -47,9 +47,13 @@
 \RecordChanges
 
 % Specify this document's metadata.
+\GetFileInfo{hyperxmp.dtx}
 \title{The \pkgname{hyperxmp} package\thanks{This document
   corresponds to \pkgname{hyperxmp}~\fileversion, dated \filedate.}}
 \author{Scott Pakin \\ \texttt{scott+hyxmp at pakin.org}}
+\makeatletter
+\edef\versionnumber{\expandafter\@gobble\fileversion}  % Drop the "v" in the file version.
+\makeatother
 \hypersetup{%
   pdfauthor={Scott Pakin},
   pdftitle={The hyperxmp package},
@@ -60,8 +64,10 @@
   pdfcaptionwriter={Scott Pakin},
   pdfcontactemail={scott+hyxmp at pakin.org},
   pdfcontacturl={http://www.pakin.org/\xmptilde scott/},
+  pdfversionid={\versionnumber},
   pdflang={en-US},
-  baseurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/hyperxmp.pdf}
+  pdfurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/hyperxmp.pdf},
+  baseurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/}
 }
 
 \begin{document}
@@ -82,7 +88,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{1845}
+% \CheckSum{2082}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -130,8 +136,10 @@
 %   \protect\pkgname{hyperxmp} code}
 % \changes{v3.4}{2017/11/04}{Use \protect\pkgname{ifmtarg} to test for
 %   empty arguments, including non-empty but all spaces}
+% \changes{v4.0}{2019/03/14}{Include all metadata within a single
+%   \protect\xmpterm{rdf:Description} block}
 %
-% \GetFileInfo{hyperxmp.dtx}
+% ^^A \GetFileInfo{hyperxmp.dtx}
 %
 % \DoNotIndex{,\,\ ,\!,\",\#,\(,\),\*,\<,\>,\@cons,\@empty}
 % \DoNotIndex{\@ifpackageloaded,\@ifundefined,\@nil,\@tempcnta,\@tempcntb}
@@ -152,7 +160,7 @@
 %   \ifx\xmptermopt\@empty
 %     \mbox{\textsf{#2}}^^A
 %   \else
-%     \mbox{\textsf{#2}}\slash\mbox{\textsf{#1}}^^A
+%     \mbox{\textsf{#2}}.\mbox{\textsf{#1}}^^A
 %     \SortIndex{#1}{\textsf{#1}}^^A
 %   \fi
 %   \SortIndex{#2}{\textsf{#2}}^^A
@@ -165,6 +173,12 @@
 %   \SortIndex{#1}{\textsf{#1} (option)}^^A
 %   \index{options&#1=\textsf{#1}}^^A
 % }
+% ^^A  \moptname is the same as \optname but also typesets the
+% ^^A  option name in the margin.
+% \DeclareRobustCommand{\moptname}[1]{^^A
+%   \optname{#1}^^A
+%   \marginpar{\raggedleft\strut\mbox{\textsf{#1}}}^^A
+% }
 % \DeclareRobustCommand{\acrostyle}[1]{\textsc{\MakeLowercase{#1}}}
 % \DeclareRobustCommand{\acro}[1]{^^A
 %   \mbox{\acrostyle{#1}}^^A
@@ -172,7 +186,7 @@
 % }
 % \newcounter{note}
 % \newcommand{\usagenote}[1]{^^A
-%   \addtocounter{note}{1}^^A
+%   \refstepcounter{note}^^A
 %   \paragraph{Note~\thenote: #1}%
 % }
 %
@@ -305,37 +319,53 @@
 % \pkgname{hyperxmp} knows how to embed all of the following types of
 % metadata within a document:
 %
+% \label{page:begin-metadata-list}
 % \begin{itemize} \raggedright
-%   \item authors (\xmpterm{dc:creator})
-%   \item base \acro{URL} (\xmpterm{xmp:BaseURL})
-%   \item contact address
+%   \item address of primary author
 %     (\xmpterm[CiAdrExtadr]{Iptc4xmpCore:CreatorContactInfo},
 %     \xmpterm[CiAdrCity]{Iptc4xmpCore:CreatorContactInfo},
 %     \xmpterm[CiAdrRegion]{Iptc4xmpCore:CreatorContactInfo},
 %     \xmpterm[CiAdrPcode]{Iptc4xmpCore:CreatorContactInfo}, and
 %     \xmpterm[CiAdrCtry]{Iptc4xmpCore:CreatorContactInfo})
-%   \item contact email address(es) (\xmpterm[CiEmailWork]{Iptc4xmpCore:CreatorContactInfo})
-%   \item contact telephone number(s) (\xmpterm[CiTelWork]{Iptc4xmpCore:CreatorContactInfo})
-%   \item contact \acro{URL}(s) (\xmpterm[CiUrlWork]{Iptc4xmpCore:CreatorContactInfo})
+%   \item author(s) (\xmpterm{dc:creator})
+%   \item base \acro{URL} for relative references (\xmpterm{xmp:BaseURL})
+%   \item book edition (\xmpterm{prism:bookEdition})
 %   \item copyright (\xmpterm{dc:rights} and \xmpterm{xmpRights:Marked})
 %   \item date (\xmpterm{dc:date}, \xmpterm{xmp:CreateDate},
 %     \xmpterm{xmp:ModifyDate}, and \xmpterm{xmp:MetadataDate})
-%   \item document identifier (\xmpterm{xmpMM:DocumentID})
-%   \item document instance identifier (\xmpterm{xmpMM:InstanceID})
-%   \item document type (\xmpterm{dc:type})
+%   \item \acro{DOI} (\xmpterm{prism:doi})
+%   \item email address(es) of primary author (\xmpterm[CiEmailWork]{Iptc4xmpCore:CreatorContactInfo})
 %   \item file format (\xmpterm{dc:format})
+%   \item file name of main \LaTeX\ source file (\xmpterm{dc:source})
+%   \item file size in bytes (\xmpterm{prism:byteCount})
+%   \item \acro{ISBN} (\xmpterm{prism:isbn})
+%   \item \acro{ISSN}---both print (\xmpterm{prism:issn}) and electronic (\xmpterm{prism:eIssn})
+%   \item issue number of parent publication (\xmpterm{prism:number})
 %   \item keywords (\xmpterm{pdf:Keywords} and \xmpterm{dc:subject})
-%   \item language (\xmpterm{dc:language})
-%   \item \LaTeX\ file name (\xmpterm{dc:source})
+%   \item language used (\xmpterm{dc:language})
 %   \item license \acro{URL} (\xmpterm{xmpRights:WebStatement})
 %   \item metadata writer (\xmpterm{photoshop:CaptionWriter})
+%   \item page count (\xmpterm{prism:pageCount})
+%   \item page range(s) (\xmpterm{prism:pageRange})
 %   \item \acro{PDF} version (\xmpterm{pdf:PDFVersion})
 %   \item \acro{PDF}-generating tool (\xmpterm{pdf:Producer} and \xmpterm{xmp:CreatorTool})
 %   \item \acro{PDF/A} compliance level and version (\xmpterm{pdfaid:part} and \xmpterm{pdfaid:conformance})
-%   \item primary author's position/title (\xmpterm{photoshop:AuthorsPosition})
+%   \item position/title of primary author (\xmpterm{photoshop:AuthorsPosition})
+%   \item publication name of parent publication (\xmpterm{prism:publicationName})
 %   \item summary (\xmpterm{dc:description})
+%   \item subtitle (\xmpterm{prism:subtitle})
+%   \item telephone number(s) of primary author (\xmpterm[CiTelWork]{Iptc4xmpCore:CreatorContactInfo})
 %   \item title (\xmpterm{dc:title})
+%   \item type of document (\xmpterm{dc:type})
+%   \item type of parent publication (\xmpterm{prism:aggregationType})
+%   \item \acro{URL} of the document (\xmpterm{prism:url})
+%   \item \acro{URL}(s) of the primary author (\xmpterm[CiUrlWork]{Iptc4xmpCore:CreatorContactInfo})
+%   \item \acro{UUID} for the document (\xmpterm{xmpMM:DocumentID})
+%   \item \acro{UUID} for the document instance (\xmpterm{xmpMM:InstanceID})
+%   \item version identifier for the document (\xmpterm{xmpMM:VersionID})
+%   \item volume number of parent publication (\xmpterm{prism:volume})
 % \end{itemize}
+% \label{page:end-metadata-list}
 %
 % \noindent
 % More types of metadata may be added in a future release.
@@ -371,7 +401,9 @@
 % |\hypersetup{|\dots|}|).  \pkgname{hyperxmp} will construct its
 % \acro{XMP} data using the following \pkgname{hyperref} options:
 %
-% \begin{itemize}
+% \begin{multicols}{3}
+%   \raggedcolumns
+%   \begin{itemize}
 %   \item \optname{baseurl}
 %   \item \optname{pdfauthor}
 %   \item \optname{pdfcreationdate}
@@ -381,7 +413,8 @@
 %   \item \optname{pdfproducer}
 %   \item \optname{pdfsubject}
 %   \item \optname{pdftitle}
-% \end{itemize}
+%   \end{itemize}
+% \end{multicols}
 %
 % \noindent
 % \mbox{}\label{page:begin-new-options}
@@ -388,10 +421,14 @@
 % \pkgname{hyperxmp} instructs \pkgname{hyperref} also to accept the
 % following options, which have meaning only to \pkgname{hyperxmp}:
 %
-% \begin{itemize}
+% \begin{multicols}{3}
+%   \raggedcolumns
+%   \begin{itemize}
 %   \item \optname{pdfaconformance}
 %   \item \optname{pdfapart}
 %   \item \optname{pdfauthortitle}
+%   \item \optname{pdfbookedition}
+%   \item \optname{pdfbytes}
 %   \item \optname{pdfcaptionwriter}
 %   \item \optname{pdfcontactaddress}
 %   \item \optname{pdfcontactcity}
@@ -404,43 +441,167 @@
 %   \item \optname{pdfcopyright}
 %   \item \optname{pdfdate}
 %   \item \optname{pdfdocumentid}
+%   \item \optname{pdfdoi}
+%   \item \optname{pdfeissn}
 %   \item \optname{pdfinstanceid}
+%   \item \optname{pdfisbn}
+%   \item \optname{pdfissn}
+%   \item \optname{pdfissuenum}
 %   \item \optname{pdflicenseurl}
 %   \item \optname{pdfmetadate}
 %   \item \optname{pdfmetalang}
+%   \item \optname{pdfpagecount}
+%   \item \optname{pdfpagerange}
+%   \item \optname{pdfpublication}
+%   \item \optname{pdfpubtype}
 %   \item \optname{pdfsource}
+%   \item \optname{pdfsubtitle}
 %   \item \optname{pdftype}
-% \end{itemize}
+%   \item \optname{pdfurl}
+%   \item \optname{pdfversionid}
+%   \item \optname{pdfvolumenum}
+%   \end{itemize}
+% \end{multicols}
 % \label{page:end-new-options}
 %
-% The two most obscure---but alphabetically first---of the above,
-% \optname{pdfaconformance} and \optname{pdfapart}, are used in
-% conjunction with \pkgname{hyperref}'s \optname{pdfa} option to claim a
-% particular \acro{PDF/A} standard by which the document abides.  They
-% default to \optname{pdfapart}=|1| and \optname{pdfaconformance}=|B|,
-% indicating the \acro{PDF/A}-\textsc{1b} standard.  These can be
-% changed (with caution) to assert that the document abides by a
-% different standard (e.g.,~\acro{PDF/A}-\textsc{2u}).
 %
-% \optname{pdfauthortitle} indicates the primary author's position or
-% title.  \optname{pdfcaptionwriter} specifies the name of the person
+% \subsection{Option descriptions}
+%
+% The document title is specified as normal for \pkgname{hyperref} with
+% \moptname{pdftitle}, but see Note~\ref{note:multilingual} on
+% page~\pageref{note:multilingual} for instructions on how to specify a
+% title in multiple languages.  \pkgname{hyperxmp} introduces a
+% complementary \moptname{pdfsubtitle} option:
+%
+% \begin{verbatim}
+%   pdftitle={Frankenstein},
+%   pdfsubtitle={The Modern Prometheus},
+% \end{verbatim}
+%
+% Unfortunately, the subtitle can appear in only one language.  It
+% assumed to be the same language as the document language
+% (\optname{pdflang}) but can be overridden by preceding the text with a
+% bracketed \acro{ISO} \mbox{639-1} two-letter language code and an
+% optional \acro{ISO} \mbox{3166-1} two-letter region code.  See the
+% example below for \optname{pdfpublication}.
+%
+% \Needspace{6\baselineskip}
+% \moptname{pdfauthortitle} indicates the primary author's position or
+% title.  \moptname{pdfcaptionwriter} specifies the name of the person
 % who added the metadata to the document.  The next eight items describe
 % how to contact the person or institution responsible for the document
-% (the ``contact'').  \optname{pdfcontactaddress} is the contact's
+% (the ``contact'').  \moptname{pdfcontactaddress} is the contact's
 % street address and can include the institution name if the contact is
-% an institution; \optname{pdfcontactcity} is the contact's city.
-% \optname{pdfcontactcountry} is the contact's country;
-% \optname{pdfcontactemail} is the contact's email address (or multiple,
-% comma-separated email addresses); \optname{pdfcontactphone} is the
-% contact's telephone number (or multiple, comma-separated telephone
-% numbers); \optname{pdfcontactpostcode} is the contact's postal code;
-% \optname{pdfcontactregion} is the contact's state or province; and
-% \optname{pdfcontacturl} is the contact's \acro{URL} (or multiple,
-% comma-separated \acro{URL}s).
+% an institution; \moptname{pdfcontactcity} is the contact's city;
+% \moptname{pdfcontactcountry} is the contact's country;
+% \moptname{pdfcontactemail} is the contact's email address (or
+% multiple, comma-separated email addresses); \moptname{pdfcontactphone}
+% is the contact's telephone number (or multiple, comma-separated
+% telephone numbers); \moptname{pdfcontactpostcode} is the contact's
+% postal code; \moptname{pdfcontactregion} is the contact's state or
+% province; and \moptname{pdfcontacturl} is the contact's \acro{URL} (or
+% multiple, comma-separated \acro{URL}s).
 %
+% \Needspace{2\baselineskip}
+% \moptname{pdfcopyright} defines the copyright text, and
+% \moptname{pdflicenseurl} identifies a \acro{URL} that points to the
+% document's license agreement.
+%
+% \moptname{pdfmetalang} indicates the natural language in which certain
+% metadata---specifically, the document's title, subject, and copyright
+% statement---are written.  The language should be specified using an
+% \acro{IETF} language tag~\cite{IANA2011:lang-tags}, for example,
+% ``|en|'' for English, ``|en-US|'' for specifically United States
+% English, ``|de|'' for German, and so forth.  If \optname{pdfmetalang}
+% is not specified, \pkgname{hyperxmp} assumes the metadata language is
+% the same as the document language (\pkgname{hyperref}'s
+% \moptname{pdflang} option).  If neither \optname{pdfmetalang} nor
+% \optname{pdflang} is specified, \pkgname{hyperxmp} uses only
+% ``|x-default|'' as the metadata language.  Note that ``|x-default|''
+% metadata are always included in addition to the specified metadata
+% language, as the user reading the document may not have specified a
+% language preference.
+%
+% \acro{XMP} can include a universally unique identifier (\acro{UUID})
+% for each document and for each instance of a given document.  By
+% default, \pkgname{hyperxmp} assigns a version~4 (i.e.,~pseudorandom)
+% \acro{UUID}~\cite{Leach2005:uuid} for each of these.  However, a
+% document can alternatively specify a particular document identifier
+% using \moptname{pdfdocumentid} and (not normally recommended) a
+% particular instance identifier using \moptname{pdfinstanceid}.  These
+% should be of the form
+% \texttt{uuid:}\textit{xxxxxxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxxxxxxxxxx},
+% where ``\textit{x}'' is a lowercase hexadecimal number.  For example,
+% \texttt{uuid:53ab7f19-a48c-5177-8bb2-403ad907f632} is a valid argument
+% to \optname{pdfdocumentid} (or \optname{pdfinstanceid}).  See Leach,
+% Mealling, and Salz's \acro{UUID} specification document for details on
+% how to produce the various forms of
+% \acro{UUID}s~\cite{Leach2005:uuid}.  A more freeform mechanism than
+% \optname{pdfinstanceid} for versioning documents is available via
+% \moptname{pdfversionid}.  The version specified by
+% \optname{pdfversionid} can be incremented as~|1|, |2|, |3|,~\dots;
+% identified with a hierarchical numbering scheme (e.g.,~this document
+% is versioned \texttt{\versionnumber} to match the package version); or
+% labeled using any other approach.  One possibility is to use a
+% revision number or commit hash from the version-control software
+% maintaining the document.  For example, the |\gitVer| macro from the
+% \pkgname{gitver} package is an expandable (see
+% Note~\ref{note:expandable} on page~\pageref{note:expandable}) version
+% of the current \href{https://git-scm.com/}{Git} hash that can suitably
+% be passed to \optname{pdfversionid}.
+%
+% Already-published documents can be identified in a number of ways.
+% \moptname{pdfisbn} specifies the \acro{ISBN}.  \moptname{pdfissn}
+% refers to the \acro{ISSN} of the \emph{print} version of the document
+% while \moptname{pdfeissn} refers to the \acro{ISSN} of the
+% \emph{electronic} version of the document.  \moptname{pdfdoi}
+% specifies the \acro{DOI} and should include only the \acro{DOI} name
+% without any \acro{URL} prefix.  For example, specify
+% |pdfdoi={10.1145/3149526.3149532}|, \emph{not}
+% |pdfdoi={https://doi.org/10.1145/3149526.3149532}|.
+% \moptname{pdfurl} points to the complete \acro{URL} for the document.
+% In contrast, \moptname{baseurl} points one level up and is used to
+% resolve relative \acro{URL}s.
+%
+% Already-published documents can further be identified by the
+% publication in which they appear.  \moptname{pdfpublication} specifies
+% the title of the journal, magazine, or other parent document.  The
+% title language is assumed to be the same as the document language
+% (\optname{pdflang}) but can be overridden by preceding the text with a
+% bracketed \acro{ISO} \mbox{639-1} two-letter language code and an
+% optional \acro{ISO} \mbox{3166-1} two-letter region code.  For
+% example, |pdfpublication={[fr]Charlie Hedbo}| indicates a
+% French-language title.  Were the language or pronunciation differences
+% significant, |fr-FR| would indicate specifically the French spoken in
+% France, as opposed to that spoken in, say, Canada (|fr-CA|) or Belgium
+% (|fr-BE|).
+%
+% \moptname{pdfpubtype} indicates the type of publication in which the
+% document was published.  This should be one of the \acro{PRISM}
+% aggregation types~\cite{PRISM2012:cont-voc} such as |book|, |journal|,
+% |magazine|, |manual|, |report|, or |whitepaper|.  For publications in
+% journals, magazines, and similar periodicals, a document can specify
+% the volume number with \moptname{pdfvolumenum} and the issue number
+% within the volume with \moptname{pdfissuenum}.
+% \moptname{pdfpagerange} indicates the page numbers at which the
+% document appears within the publication.  The intention is that this
+% be a comma-separated list of dash-separated ranges, as in
+% |pdfpagerange={1,4-5}|.  See Note~\ref{note:page-counting} on
+% page~\pageref{note:page-counting} for advice on how to assign
+% \optname{pdfpagerange} semi-automatically.  For books,
+% \moptname{pdfbookedition} names the edition of the book.  This is
+% specified as text, not a number.  As with \optname{pdfpublication}
+% (above), \optname{pdfbookedition} accepts a bracketed language code,
+% as in |pdfbookedition={[en]Second| |edition}|.
+%
+% The number of pages in the published, print version of the document
+% can be expressed with \moptname{pdfnumpages}.
+% Note~\ref{note:page-counting} on page~\pageref{note:page-counting}
+% explains how to automatically assign a value to \optname{pdfnumpages}.
+%
 % \acro{XMP} metadata can include a number of dates (in fact,
 % timestamps, as they include both date and time components).
-% \optname{pdfdate} specifies the document date.  It is analogous to the
+% \moptname{pdfdate} specifies the document date.  It is analogous to the
 % \LaTeX\ |\date| command, and, like |\date|, defaults to the date the
 % document was built.  It must be specified in either \acro{XMP}
 % format~\cite{Adobe2012:XMP} or \acro{PDF} format~\cite{Adobe2008:PDF}.
@@ -453,8 +614,8 @@
 % midnight U.S. Mountain Daylight Time (UTC-6) on the 23rd day of
 % September in the year~2014 should be written as
 % \texttt{2014-09-23T14:15:09-06:00}.  This can be truncated (with loss
-% of information) to \texttt{2014-09-23T14:15:09} or
-% \texttt{2014-09-23T14:15} or \texttt{2014-09-23} or \texttt{2014-09}
+% of information) to \texttt{2014-09-23T14:15:09},
+% \texttt{2014-09-23T14:15}, \texttt{2014-09-23}, \texttt{2014-09},
 % or \texttt{2014} but no other subsets.  \acro{PDF} dates are written
 % in the form |D:|\textsc{yyyymmdd}hhmmss|+|\textsc{tt}|'|tt|'|.  The
 % same date in the preceding example would be written as
@@ -461,8 +622,8 @@
 % \texttt{D:20140923141509-06'00'} in \acro{PDF} format.
 %
 % The document's creation date, modification date, and metadata date are
-% normally set automatically, but \optname{pdfcreationdate},
-% \optname{pdfmoddate}, and \optname{pdfmetadate} can be used to
+% normally set automatically, but \moptname{pdfcreationdate},
+% \moptname{pdfmoddate}, and \moptname{pdfmetadate} can be used to
 % override the defaults.  Like \optname{pdfdate}, \optname{pdfmetadate}
 % can be specified in either \acro{XMP} or \acro{PDF} format.  However,
 % because \pkgname{hyperref} defines \optname{pdfcreationdate} and
@@ -472,119 +633,123 @@
 % would need to specify any of \optname{pdfcreationdate},
 % \optname{pdfmoddate}, or \optname{pdfmetadate}.
 %
-% \optname{pdfcopyright} defines the copyright text, and
-% \optname{pdflicenseurl} identifies a \acro{URL} that points to the
-% document's license agreement.
+% \moptname{pdftype} describes the type of document being produced.
+% This refers to ``the nature or genre of the
+% resource''~\cite{Adobe2012:XMP} such as |poem|, |novel| or |working|
+% |paper|, as opposed to the file format (always |application/pdf| when
+% generated by \pkgname{hyperxmp}).  Although \optname{pdftype} can be
+% assigned an arbitrary piece of text, the \acro{XMP} specification
+% recommends selecting types from a ``controlled vocabulary'' such as
+% the \acro{DCMI} Type Vocabulary~\cite{DCMI2012:meta-terms}.  The
+% \acro{DCMI} Type Vocabulary currently consists of only |Collection|,
+% |Dataset|, |Event|, |Image|, |InteractiveResource|, |MovingImage|,
+% |PhysicalObject|, |Service|, |Software|, |Sound|, |StillImage|, and
+% |Text|.  \optname{pdftype} defaults to |Text|, which refers to
+% ``books, letters, dissertations, poems, newspapers, articles, archives
+% of mailing lists,''~\cite{DCMI2012:meta-terms} and other forms of
+% text---all things \LaTeX\ is commonly used to typeset.
 %
-% \acro{XMP} can include a universally unique identifier (\acro{UUID})
-% for each document and for each instance of a given document.  By
-% default, \pkgname{hyperxmp} assigns a version~4 (i.e.,~pseudorandom)
-% \acro{UUID}~\cite{Leach2005:uuid} for each of these.  However, a
-% document can alternatively specify a particular document identifier
-% using \optname{pdfdocumentid} and (not normally recommended) a
-% particular instance identifier using \optname{pdfinstanceid}.  These
-% should be of the form
-% \texttt{uuid:}\textit{xxxxxxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxxxxxxxxxx},
-% where ``\textit{x}'' is a lowercase hexadecimal number.  For example,
-% \texttt{uuid:53ab7f19-a48c-5177-8bb2-403ad907f632} is a valid argument
-% to \optname{pdfdocumentid} (or \optname{pdfinstanceid}).  See Leach,
-% Mealling, and Salz's \acro{UUID} specification document for details on
-% how to produce the various forms of
-% \acro{UUID}s~\cite{Leach2005:uuid}.
+% The \moptname{pdfbytes} option expresses the document's file size in
+% bytes.  The intention is for this to be used to display an estimate of
+% download time to a user or to serve as a quick check on whether a file
+% was transmitted correctly between systems.  This feature is easiest to
+% use in conjunction with \pdfTeX's |\pdffilesize| primitive:
+% ``|pdfbytes={\pdffilesize{\jobname.pdf}}|''.  Note that this requires
+% a second run of |pdftex| because it queries the size of the \acro{PDF}
+% file from the \emph{previous} run.
 %
-% \optname{pdfmetalang} indicates the natural language in which certain
-% metadata---specifically, the document's title, subject, and copyright
-% statement---are written.  The language should be specified using an
-% \acro{IETF} language tag~\cite{IANA2011:lang-tags}, for example,
-% ``|en|'' for English, ``|en-US|'' for specifically United States
-% English, ``|de|'' for German, and so forth.  If \optname{pdfmetalang}
-% is not specified, \pkgname{hyperxmp} assumes the metadata language is
-% the same as the document language (\pkgname{hyperref}'s
-% \optname{pdflang} option).  If neither \optname{pdfmetalang} nor
-% \optname{pdflang} is specified, \pkgname{hyperxmp} uses only
-% ``|x-default|'' as the metadata language.  Note that ``|x-default|''
-% metadata are always included in addition to the specified metadata
-% language, as the user reading the document may not have specified a
-% language preference.
-%
-% A rarely needed option, \optname{pdfsource}, overrides the name of the
-% \LaTeX\ source file.  It defaults to ``|\jobname.tex|'' but can be
+% A rarely needed option, \moptname{pdfsource}, overrides the name of
+% the \LaTeX\ source file.  It defaults to |\jobname.tex| but can be
 % replaced by any other string.  If \optname{pdfsource} is given an
 % empty argument, no document source will be specified at all.
 %
-% \optname{pdftype} describes the type of document being produced.  This
-% refers to ``the nature or genre of the resource''~\cite{Adobe2012:XMP}
-% such as ``|poem|'', ``|novel|'' or ``|working paper|'', as opposed to
-% the file format (always ``|application/pdf|'' when generated by
-% \pkgname{hyperxmp}).  Although \optname{pdftype} can be assigned an
-% arbitrary piece of text, the \acro{XMP} specification recommends
-% selecting types from a ``controlled vocabulary'' such as the DCMI Type
-% Vocabulary~\cite{DCMI2012:meta-terms}.  The DCMI Type Vocabulary
-% currently consists of only ``|Collection|'', ``|Dataset|'',
-% ``|Event|'', ``|Image|'', ``|InteractiveResource|'',
-% ``|MovingImage|'', ``|PhysicalObject|'', ``|Service|'',
-% ``|Software|'', ``|Sound|'', ``|StillImage|'', and ``|Text|''.
-% \optname{pdftype} defaults to ``|Text|'', which refers to ``books,
-% letters, dissertations, poems, newspapers, articles, archives of
-% mailing lists,''~\cite{DCMI2012:meta-terms} and other forms of
-% text---all things \LaTeX\ is commonly used to typeset.
+% Two other rarely needed options, \moptname{pdfaconformance} and
+% \moptname{pdfapart}, are used in conjunction with \pkgname{hyperref}'s
+% \optname{pdfa} option to claim a particular \acro{PDF/A} standard by
+% which the document abides.  They default to \optname{pdfapart}=|1| and
+% \optname{pdfaconformance}=|B|, indicating the \acro{PDF/A}-\textsc{1b}
+% standard.  These can be changed (with caution) to assert that the
+% document abides by a different standard
+% (e.g.,~\acro{PDF/A}-\textsc{2u}).
 %
+% \bigskip
+%
 % It is usually more convenient to provide values for those options using
 % \pkgname{hyperref}'s |\hypersetup| command than on the |\usepackage|
 % command line.  See
 % \href{http://mirrors.ctan.org/macros/latex/contrib/hyperref/hyperref.pdf}{the
-% \pkgname{hyperref} manual} for more information.  The following is a
-% sample \LaTeX\ document that provides values for most of the metadata
-% options that \pkgname{hyperxmp} recognizes:
+% \pkgname{hyperref} manual} for more information.
 %
+%
+% \subsection{A complete example}
+%
+% The following is a sample \LaTeX\ document that provides values for
+% most of the metadata options that \pkgname{hyperxmp} recognizes:
+%
 % \Needspace{4\baselineskip}
 % \refstepcounter{pagelabel}
 % \label{page:begin-sample-doc}
 % \begin{verbatim}
-%     \documentclass{article}
-%     \usepackage{hyperxmp}
-%     \usepackage[unicode]{hyperref}
-%     \title{%
-%       On a heuristic viewpoint concerning the production and
-%       transformation of light}
-%     \author{Albert Einstein}
-%     \date{March 17, 1905}
-%     \hypersetup{%
-%       pdftitle={%
-%         On a heuristic viewpoint concerning the production and
-%         transformation of light},
-%       pdfauthor={Albert Einstein},
-%       pdfauthortitle={Technical Assistant, Level III},
-%       pdfdate={1905-03-17},
-%       pdfcopyright={Copyright (C) 1905, Albert Einstein},
-%       pdfsubject={photoelectric effect},
-%       pdfkeywords={energy quanta, Hertz effect, quantum physics},
-%       pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/3.0/},
-%       pdfcaptionwriter={Scott Pakin},
-%       pdfcontactaddress={Kramgasse 49},
-%       pdfcontactcity={Bern},
-%       pdfcontactpostcode={3011},
-%       pdfcontactcountry={Switzerland},
-%       pdfcontactphone={031 312 00 91},
-%       pdfcontactemail={aeinstein at ipi.ch},
-%       pdfcontacturl={%
-%         http://einstein.biz/,
-%         https://www.facebook.com/AlbertEinstein
-%       },
-%       pdfdocumentid={uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0},
-%       pdflang={en},
-%       pdfmetalang={en},
-%       baseurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/}
-%     }
-%     \XMPLangAlt{de}{pdftitle={Über einen die Erzeugung und Verwandlung
-%       des Lichtes betreffenden heuristischen Gesichtspunkt}}
-%     \begin{document}
-%     \maketitle
-%     A profound formal difference exists between the theoretical
-%     concepts that physicists have formed about gases and other
-%     ponderable bodies, and Maxwell's theory of electromagnetic
-%     processes in so-called empty space\dots
-%     \end{document}
+%    \documentclass{article}
+%    \usepackage[utf8]{inputenc}
+%    \usepackage{hyperxmp}
+%    \usepackage[unicode]{hyperref}
+%
+%    \title{%
+%      On a heuristic viewpoint concerning the production and
+%      transformation of light}
+%    \author{Albert Einstein}
+%    \date{March 17, 1905}
+%
+%    \hypersetup{%
+%      pdftitle={%
+%        On a heuristic viewpoint concerning the production and
+%        transformation of light},
+%      pdfsubtitle={[en-US]Putting that bum Maxwell in his place},
+%      pdfauthor={Albert Einstein},
+%      pdfauthortitle={\xmpquote{Technical Assistant\xmpcomma\ Level III}},
+%      pdfdate={1905-03-17},
+%      pdfcopyright={Copyright (C) 1905, Albert Einstein},
+%      pdfsubject={photoelectric effect},
+%      pdfkeywords={energy quanta, Hertz effect, quantum physics},
+%      pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/3.0/},
+%      pdfcaptionwriter={Scott Pakin},
+%      pdfcontactaddress={Kramgasse 49},
+%      pdfcontactcity={Bern},
+%      pdfcontactpostcode={3011},
+%      pdfcontactcountry={Switzerland},
+%      pdfcontactphone={031 312 00 91},
+%      pdfcontactemail={aeinstein at ipi.ch},
+%      pdfcontacturl={%
+%        http://einstein.biz/,
+%        https://www.facebook.com/AlbertEinstein
+%      },
+%      pdfdocumentid={uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0},
+%      pdfversionid={2.998e8},
+%      pdfpublication={[de]Annalen der Physik},
+%      pdfpubtype={journal},
+%      pdfvolumenum={322},
+%      pdfissuenum={6},
+%      pdfpagerange={132-148},
+%      pdfnumpages={17},
+%      pdfissn={0003-3804},
+%      pdfeissn={1521-3889},
+%      pdflang={en},
+%      pdfmetalang={en},
+%      pdfurl={http://www.physik.uni-augsburg.de/annalen/history/einstein-papers/1905_17_132-148.pdf},
+%      pdfdoi={10.1002/andp.19053220607},
+%      pdfbytes={\pdffilesize{\jobname.pdf}}   % Requires pdflatex
+%    }
+%    \XMPLangAlt{de}{pdftitle={Über einen die Erzeugung und Verwandlung des
+%      Lichtes betreffenden heuristischen Gesichtspunkt}}
+%
+%    \begin{document}
+%    \maketitle
+%    A profound formal difference exists between the theoretical
+%    concepts that physicists have formed about gases and other
+%    ponderable bodies, and Maxwell's theory of electromagnetic
+%    processes in so-called empty space\dots
+%    \end{document}
 % \end{verbatim}
 % \refstepcounter{pagelabel}
 % \label{page:end-sample-doc}
@@ -635,51 +800,68 @@
 %   \label{fig:xmp-metadata-2}
 % \end{figure}
 %
-% \usagenote{Acrobat \pdfterm{Author} bug}
-% \label{page:author-bug}
-% A bug in Adobe Acrobat---at least in versions~10.0.1 and
-% earlier---causes that \acro{PDF} reader to confuse the \acro{XMP} and
-% non-\acro{XMP} author lists when displaying the document's metadata.
-% Specifically, the first author is displayed as the concatenated list
-% of authors from the non-\acro{XMP} data (\pdfterm{Author}) while the
-% remaining authors are displayed from the \acro{XMP} data
-% (\xmpterm{dc:creator}).  For example, suppose that a document's authors
-% are Jack Napier, Edward Nigma, and Harvey Dent.  When displaying the
-% document properties, Adobe Acrobat replaces ``Jack Napier'' with a
-% single author named ``Jack Napier, Edward Nigma, Harvey Dent'' and
-% leaves ``Edward Nigma'' and ``Harvey Dent'' as the second and third
-% authors, respectively.
 %
-% \DescribeMacro{\XMPTruncateList}
-% The \pkgname{hyperxmp} package provides a workaround for this bug in
-% the form of the |\XMPTruncateList| macro.  |\XMPTruncateList| takes
-% the name of a list (a \pkgname{hyperref} option name) and replaces the
-% list with the value of its first element.  Currently, the only
-% meaningful usage is to put
+% \subsection{Usage notes}
 %
+% \usagenote{Conflicting metadata in PDF/A documents}
+% A \acro{PDF} file includes an \pdfterm{Info} dictionary containing
+% \pdfterm{Author}, \pdfterm{Title}, \pdfterm{Subject}, and
+% \pdfterm{Keywords} keys.  The \pkgname{hyperref} package's
+% \optname{pdfauthor}, \optname{pdftitle}, \optname{pdfsubject}, and
+% \optname{pdfkeywords} options assign values to those keys.  The
+% \pkgname{hyperxmp} package additionally uses those options to assign
+% values to various \acro{XMP} metadata: \xmpterm{dc:creator},
+% \xmpterm{dc:title}, \xmpterm{dc:description}, and
+% \xmpterm{pdf:Keywords}.  The \acro{PDF/A} specification indicates that
+% values that appear in both the \acro{PDF} \pdfterm{Info} dictionary
+% and \acro{XMP} packet must match.  The problem is that in \acro{XMP},
+% the author and keywords can be proper lists, as in
+%
+% \Needspace{7\baselineskip}
 % \begin{verbatim}
-%     \XMPTruncateList{pdfauthor}
+%     <dc:creator>
+%       <rdf:Seq>
+%         <rdf:li>Curly Howard</rdf:li>
+%         <rdf:li>Larry Fine</rdf:li>
+%         <rdf:li>Moe Howard</rdf:li>
+%       </rdf:Seq>
+%     </dc:creator>
 % \end{verbatim}
 %
 % \noindent
-% in your document's preamble.  This will cause Adobe Acrobat to
-% properly display all of the authors but at the cost of other
-% \acro{PDF} readers likely displaying only the first author.
+% while in \acro{PDF}, the author and keywords are specified as flat
+% strings.  Alas, there is no definition of how a list should be
+% collapsed to a flat string: ``\texttt{Curly Howard, Larry Fine, Moe
+%   Howard}'' or ``\texttt{Curly Howard; Larry Fine; Moe Howard}'' or
+% something else.  I have not yet found a form of flat string that
+% passes all \acro{PDF/A} validators.  Furthermore, when Adobe
+% Acrobat---at least Adobe Acrobat DC (2019) and earlier
+% versions---converts a \acro{PDF} file to \acro{PDF/A} format, it does
+% so by discarding all but the first author, which is an unsatisfying
+% solution.
 %
+% Starting with version~4.0, \pkgname{hyperxmp}'s solution is to
+% suppress writing metadata to the \acro{PDF} \pdfterm{Info} dictionary
+% and write it only to the \acro{XMP} packet.  This appears to pacify
+% \acro{PDF/A} validators yet retains the author and keyword lists in
+% their non-truncated form.  If desired, the \pdfterm{Info} dictionary
+% can be retained by passing the \optname{keeppdfinfo} option to
+% \cs{hypersetup}.
+%
 % \usagenote{Acrobat multiline-field bug}
 % The \acro{IPTC} Photo Metadata schema states that ``the [contact]
 % address is a multiline field''~\cite{IPTC2010:photo-meta}.
 % \pkgname{hyperxmp} converts commas in \optname{pdfcontactaddress}'s
 % argument to line breaks in the generated \acro{XML}\@.  Unfortunately,
-% A bug in Adobe Acrobat---at least in versions~10.0.1 and
-% earlier---causes that \acro{PDF} reader to discard line breaks in the
-% contact address.  Interestingly, Adobe Illustrator CS5 correctly
-% displays the contact address.
-% \DescribeMacro{\xmplinesep}
-% If you find Adobe Acrobat's behavior bothersome, you can redefine the
-% |\xmplinesep| macro as a string to use as an address-line separator.
-% For example, the following replaces all commas appearing in
-% \optname{pdfcontactaddress}'s argument with semicolons:
+% A bug in Adobe Acrobat---at least in Adobe Acrobat DC (2019) and
+% earlier versions---causes that \acro{PDF} reader to discard line
+% breaks in the contact address.  Interestingly, Adobe Illustrator CS5
+% correctly displays the contact address.  If you find Adobe Acrobat's
+% behavior bothersome, you can redefine the
+% \DescribeMacro{\xmplinesep}|\xmplinesep| macro as a string to use as
+% an address-line separator.  For example, the following replaces all
+% commas appearing in \optname{pdfcontactaddress}'s argument with
+% semicolons:
 %
 % \begin{verbatim}
 %     \renewcommand*{\xmlinesep}{;}
@@ -800,6 +982,7 @@
 % a modicum of \acro{XMP} metadata with no additional effort.
 %
 % \usagenote{Multilingual metadata}
+% \label{note:multilingual}
 % The \optname{pdfmetalang} option specifies the language in which the
 % document's metadata is written.  It defaults to the value of
 % \optname{pdflang}, which specifies the document language.
@@ -836,6 +1019,7 @@
 % \end{verbatim}
 %
 % \usagenote{Expandable arguments}
+% \label{note:expandable}
 % All arguments passed to \pkgname{hyperxmp} options must be expandable,
 % in \tex\ terminology.  This implies that any macros that are used in
 % arguments are limited to a relatively small set of operations (such as
@@ -870,12 +1054,77 @@
 % package in the output file to ensure that any macros used in arguments
 % to \pkgname{hyperxmp} options produced the expected output.
 %
+% \usagenote{Automatic page counting}
+% \label{note:page-counting}
+% Although \optname{pdfnumpages} and \optname{pdfpagerange} are intended
+% to refer to pages in the final, published version of a document, it
+% would be convenient for them to be generated automatically when
+% producing a standalone \acro{PDF} file that is not intended to be
+% incorporated into a book, journal, or other publication (or if it is
+% known that the pages will not be renumbered for publication).  One
+% approach is to use the \pkgname{totpages} package to keep track of the
+% number of pages.
 %
+% \begin{verbatim}
+%     \hypersetup{%
+%       pdfnumpages={\ref*{TotPages}}
+%     }
+% \end{verbatim}
+%
+% \pkgname{totpages} can likewise help generate \optname{pdfpagerange}.
+% For documents numbered from~1 to~$n$, a simple
+%
+% \begin{verbatim}
+%     \hypersetup{%
+%       pdfpagerange={1-\ref*{TotPages}}
+%     }
+% \end{verbatim}
+%
+% \noindent
+% should suffice.  A bit more effort is needed for documents that change
+% numbering schemes, such as using lowercase Roman numerals for the
+% front matter and Arabic numerals for the main matter and back matter.
+% One approach is to use \cs{label} to mark the first and last page of
+% each numbering scheme and specify \optname{pdfpagerange} as in the
+% following:
+%
+% \Needspace{6\baselineskip}
+% \begin{verbatim}
+%     \hypersetup{%
+%       pdfpagerange={%
+%         \pageref*{page:begin-front}-\pageref*{page:end-front},%
+%         1-\pageref*{TotPages}%
+%       }
+%     }
+% \end{verbatim}
+%
+% I don't know how unnumbered pages (e.g.,~blank pages and the title
+% page) are supposed to be handled.  I suppose blank pages can be
+% omitted from \optname{pdfpagerange}, and title page can be either
+% omitted or listed as |title|, for example.
+%
+% It appears that at least with version~2.00 of \pkgname{totpages}, the
+% |TotPages| label is not defined until after the |\begin{document}|.
+% Consequently, using |TotPages| within a \cs{hypersetup} invocation in
+% the document's preamble will produce ``|??|'' as the page count in the
+% \acro{XMP} packet.  The solution is either to assign
+% \optname{pdfnumpages} and \optname{pdfpagerange} after the
+% |\begin{document}| or to ask \LaTeX\ to do that on your behalf:
+%
+% \begin{verbatim}
+%     \AtBeginDocument{%
+%       \hypersetup{%
+%         pdfnumpages={\ref*{TotPages}},
+%         pdfpagerange={1-\ref*{TotPages}}
+%       }%
+%     }
+% \end{verbatim}
+%
+%
 % \StopEventually{^^A
-% \section{Future Work}
-% \label{sec:future-work}
+% \section{Help Wanted}
 %
-% \paragraph{Help wanted}
+% \paragraph{Comma handling}
 % Ideally, \texttt{\string\xmpquote} should automatically replace all
 % commas with \texttt{\string\xmpcomma}.  Unfortunately, my \tex\ skills
 % are insufficient to pull that off.  If you know a way to make
@@ -886,7 +1135,7 @@
 %
 % \appendix
 %
-% \section{Sample XMP packet}
+% \section{Sample XMP Packet}
 % \label{sec:sample-packet}
 %
 % The following is an example of a complete \acro{XMP} packet as may be
@@ -901,18 +1150,18 @@
 % \begin{thebibliography}{1}
 % \bibitem{Adobe2010:pdfmark}
 % Adobe Systems, Inc., San Jose, California.
-% \newblock {\em {A}dobe {A}crobat~{X} {SDK} Help, pdfmark Reference}.
+% \newblock \emph{{A}dobe {A}crobat~{X} {SDK} Help, pdfmark Reference}.
 % \newblock Available from
 %   \url{http://www.adobe.com/devnet/acrobat/documentation.html}.
 %
 % \bibitem{Adobe1996:postscript}
 % {Adobe Systems, Inc.}
-% \newblock {\em {P}ost{S}cript Language Reference Manual}.
+% \newblock \emph{{P}ost{S}cript Language Reference Manual}.
 % \newblock Addison-Wesley, 2nd edition, January 1996, ISBN: \mbox{0-201-18127-4}.
 %
 % \bibitem{Adobe2008:PDF}
 % Adobe Systems, Inc., San Jose, California.
-% \newblock {\em Document Management---Portable Document Format---Part 1:
+% \newblock \emph{Document Management---Portable Document Format---Part 1:
 %   PDF~1.7}, July 2008.
 % \newblock ISO \mbox{32000-1} standard document. Available from
 %   \url{http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf}.
@@ -919,7 +1168,7 @@
 %
 % \bibitem{Adobe2012:XMP}
 % Adobe Systems, Inc., San Jose, California.
-% \newblock {\em {XMP} Specification Part~1: Data model, Serialization, and Core
+% \newblock \emph{{XMP} Specification Part~1: Data model, Serialization, and Core
 %   Properties}, April 2012.
 % \newblock Available from
 %   \url{http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/cc-201306/XMPSpecificationPart1.pdf}.
@@ -926,7 +1175,7 @@
 %
 % \bibitem{DCMI2012:meta-terms}
 % DCMI Usage Board
-% \newblock {\em DCMI Metadata Terms}, June~14, 2012.
+% \newblock \emph{DCMI Metadata Terms}, June~14, 2012.
 % \newblock Available from \url{http://dublincore.org/documents/dcmi-terms/}.
 %
 % \bibitem{Downes1994:ATB15}
@@ -937,9 +1186,23 @@
 % \newblock Archived by Google at
 %   \url{http://groups.google.com/group/comp.text.tex/msg/7da7643b9e8f3b48}.
 %
+% \bibitem{PRISM2012:basic-meta}
+% International Digital Enterprise Alliance, Inc.
+% \newblock \emph{Publishing Requirements for Industry Standard Metadata,
+%   Version~3.0: {PRISM} Basic Metadata Specification}, October~12, 2012.
+% \newblock Available from
+%   \url{http://www.prismstandard.org/specifications/3.0/PRISM_Basic_Metadata_3.0.htm}.
+%
+% \bibitem{PRISM2012:cont-voc}
+% International Digital Enterprise Alliance, Inc.
+% \newblock \emph{Publishing Requirements for Industry Standard Metadata,
+%   Version~3.0: {PRISM} Controlled Vocabularies Specification}, October~4, 2012.
+% \newblock Available from
+%   \url{http://www.prismstandard.org/specifications/3.0/PRISM_CV_Spec_3.0.pdf}.
+%
 % \bibitem{IPTC2010:photo-meta}
 % International Press Telecommunications Council.
-% \newblock {\em {IPTC} Photo Metadata: Core 1.1/Extension 1.1}, July 2010.
+% \newblock \emph{{IPTC} Photo Metadata: Core 1.1/Extension 1.1}, July 2010.
 % \newblock Revision~1. Available from
 %   \url{http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata-201007_1.pdf}.
 %
@@ -959,7 +1222,7 @@
 %
 % \bibitem{PDFA2008:xmp-props}
 % PDF/A Competence Center, Berlin, Germany.
-% \newblock {\em {T}ech{N}ote~0008: Predefined {XMP} Properties in {PDF/A-1}},
+% \newblock \emph{{T}ech{N}ote~0008: Predefined {XMP} Properties in {PDF/A-1}},
 %   March~20, 2008.
 % \newblock Available from
 %   \url{http://www.pdfa.org/wp-content/uploads/2011/08/tn0008_predefined_xmp_properties_in_pdfa-1_2008-03-20.pdf}.
@@ -966,7 +1229,7 @@
 %
 % \bibitem{PDFA2008:ext-schemas}
 % PDF/A Competence Center, Berlin, Germany.
-% \newblock {\em {T}ech{N}ote~0009: {XMP} Extension Schemas in {PDF/A-1}},
+% \newblock \emph{{T}ech{N}ote~0009: {XMP} Extension Schemas in {PDF/A-1}},
 %   March~20, 2008.
 % \newblock Available from
 %   \url{http://www.pdfa.org/wp-content/uploads/2011/08/tn0009_xmp_extension_schemas_in_pdfa-1_2008-03-20.pdf}.
@@ -1100,7 +1363,7 @@
 % \begin{macro}{\@pdfdatetime}
 % Prepare to store the document's date and (optionally) time.  Whether
 % specified by the author in \acro{XMP} format or \acro{PDF} format
-% (cf.~Section~\ref{sec:date-manip}) we always store |\@pdfdatetime| as
+% (see Section~\ref{sec:date-manip}) we always store |\@pdfdatetime| as
 % an \acro{XMP}-format string.
 %    \begin{macrocode}
 \def\@pdfdatetime{}
@@ -1125,7 +1388,7 @@
 % \begin{macro}{\@pdfmetadatetime}
 % Prepare to store the document's metadata date and (optionally) time.
 % Whether specified by the author in \acro{XMP} format or \acro{PDF}
-% format (cf.~Section~\ref{sec:date-manip}) we always store
+% format (see Section~\ref{sec:date-manip}) we always store
 % |\@pdfmetadatetime| as an \acro{XMP}-format string.
 %    \begin{macrocode}
 \def\@pdfmetadatetime{}
@@ -1246,6 +1509,139 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@pdfversionid}
+% Prepare to store a \acro{UUID} that represents the current version of
+% the document.
+%    \begin{macrocode}
+\def\@pdfversionid{}
+\define at key{Hyp}{pdfversionid}{\hyxmp at pdfstringdef\@pdfversionid{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfpublication}
+% Prepare to store the name of the publication in which the
+% document was published.
+%    \begin{macrocode}
+\def\@pdfpublication{}
+\define at key{Hyp}{pdfpublication}{\hyxmp at pdfstringdef\@pdfpublication{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfpubtype}
+% Prepare to store the type of the publication in which the
+% document was published.
+%    \begin{macrocode}
+\def\@pdfpubtype{}
+\define at key{Hyp}{pdfpubtype}{\hyxmp at pdfstringdef\@pdfpubtype{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfbytes}
+% Prepare to store the size of the file in bytes.
+%    \begin{macrocode}
+\def\@pdfbytes{}
+\define at key{Hyp}{pdfbytes}{\hyxmp at pdfstringdef\@pdfbytes{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfnumpages}
+% Prepare to store the number of pages in the file.
+%    \begin{macrocode}
+\def\@pdfnumpages{}
+\define at key{Hyp}{pdfnumpages}{\hyxmp at pdfstringdef\@pdfnumpages{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfissn}
+% Prepare to store the \acro{ISSN} of the publication in which the
+% document was published.
+%    \begin{macrocode}
+\def\@pdfissn{}
+\define at key{Hyp}{pdfissn}{\hyxmp at pdfstringdef\@pdfissn{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfeissn}
+% Prepare to store the \acro{ISSN} of the electronic version of the
+% publication in which the document was published.
+%    \begin{macrocode}
+\def\@pdfeissn{}
+\define at key{Hyp}{pdfeissn}{\hyxmp at pdfstringdef\@pdfeissn{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfisbn}
+% Prepare to store the \acro{ISBN} of the publication in which the
+% document was published.
+%    \begin{macrocode}
+\def\@pdfisbn{}
+\define at key{Hyp}{pdfisbn}{\hyxmp at pdfstringdef\@pdfisbn{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfbookedition}
+% Prepare to store the edition of the book in which the document
+% was published.
+%    \begin{macrocode}
+\def\@pdfbookedition{}
+\define at key{Hyp}{pdfbookedition}{\hyxmp at pdfstringdef\@pdfbookedition{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfvolumenum}
+% Prepare to store the volume identifier of the publication in which the
+% document was published.
+%    \begin{macrocode}
+\def\@pdfvolumenum{}
+\define at key{Hyp}{pdfvolumenum}{\hyxmp at pdfstringdef\@pdfvolumenum{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfissuenum}
+% Prepare to store the identifier of the issue within a volume of the
+% publication in which the document was published.
+%    \begin{macrocode}
+\def\@pdfissuenum{}
+\define at key{Hyp}{pdfissuenum}{\hyxmp at pdfstringdef\@pdfissuenum{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfpagerange}
+% Prepare to store the document's range of pages within the publication
+% in which the document was published.
+%    \begin{macrocode}
+\def\@pdfpagerange{}
+\define at key{Hyp}{pdfpagerange}{\hyxmp at pdfstringdef\@pdfpagerange{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfdoi}
+% Prepare to store a \acro{DOI} that represents the current instance of
+% the document.
+%    \begin{macrocode}
+\def\@pdfdoi{}
+\define at key{Hyp}{pdfdoi}{\hyxmp at pdfstringdef\@pdfdoi{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfurl}
+% Prepare to store a \acro{URL} that represents where the document
+% can be found.  Note that we do not prepend \optname{baseurl} to
+% the value provided.
+%    \begin{macrocode}
+\def\@pdfurl{}
+\define at key{Hyp}{pdfurl}{\hyxmp at pdfstringdef\@pdfurl{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdfsubtitle}
+% Prepare to store the document's subtitle.
+%    \begin{macrocode}
+\def\@pdfsubtitle{}
+\define at key{Hyp}{pdfsubtitle}{\hyxmp at pdfstringdef\@pdfsubtitle{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
 % The following eight macros---|\@pdfcontactaddress|,
 % |\@pdfcontactcity|, |\@pdfcontactregion|, |\@pdfcontactpostcode|,
 % |\@pdfcontactcountry|, |\@pdfcontactphone|, |\@pdfcontactemail|, and
@@ -1342,6 +1738,25 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\hyxmp at suppress@pdf at metadata}
+% Suppress \pkgname{hyperref} from writing \pdfterm{Author},
+% \pdfterm{Title}, \pdfterm{Subject}, and other \acro{PDF} metadata into
+% the \pdfterm{Info} dictionary.  This prevents conflicts between the
+% \acro{PDF} metadata and the \acro{XMP} metadata, which cause
+% \acro{PDF/A} validation to fail.  The \acro{PDF} metadata can be
+% restored by passing the \optname{keeppdfinfo} option to
+% |\hypersetup|.
+% \changes{v4.0}{2019/03/31}{Added this macro}
+%    \begin{macrocode}
+\def\hyxmp at suppress@pdf at metadata{%
+  \global\let\PDF at FinishDoc=\@empty
+}
+\define at key{Hyp}{keeppdfinfo}[true]{%
+  \gdef\hyxmp at suppress@pdf at metadata{}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
 % \changes{v2.1}{2012/09/16}{Enabled \protect\pkgname{hyperxmp} and
 %   \protect\pkgname{hyperref} to be loaded in either order.  This addresses
 %   a bug report by Yury Donskoy}
@@ -1536,6 +1951,8 @@
     \@baseurl
     \@pdfauthor
     \@pdfauthortitle
+    \@pdfbookedition
+    \@pdfbytes
     \@pdfcaptionwriter
     \@pdfcontactaddress
     \@pdfcontactcity
@@ -1548,14 +1965,27 @@
     \@pdfcopyright
     \@pdfcreationdate
     \@pdfdatetime
+    \@pdfdoi
+    \@pdfeissn
+    \@pdfisbn
+    \@pdfissn
+    \@pdfissuenum
     \@pdfkeywords
     \@pdflang
     \@pdflicenseurl
     \@pdfmetadatetime
     \@pdfmoddate
+    \@pdfnumpages
+    \@pdfpagerange
+    \@pdfpublication
+    \@pdfpubtype
     \@pdfsubject
+    \@pdfsubtitle
     \@pdftitle
     \@pdftype
+    \@pdfurl
+    \@pdfversionid
+    \@pdfvolumenum
   }%
   \ifx\hyxmp at concated@metadata\@empty
     \PackageWarningNoLine{hyperxmp}{%
@@ -1653,6 +2083,7 @@
 % and thereby \pkgname{hyperxmp}.
 %    \begin{macrocode}
     \hyxmp at at@end{%
+      \hyxmp at suppress@pdf at metadata
       \hyxmp at find@metadata
       \hyxmp at embed@packet
     }%
@@ -1795,17 +2226,22 @@
 % \changes{v2.3b}{2013/07/18}{Made all definitions local to avoid
 %   spurious \texttt{Too many unprocessed floats} errors when running
 %   with \string\pkgname{memoir}}
+% \changes{v4.0}{2019/03/31}{Deprecated this macro}
 % \begin{macro}{\hyxmp at temp@str}
 % \begin{macro}{\hyxmp at temp@list}
 % \begin{macro}{\@elt}
-% As a workaround for Adobe Acrobat's inability to display author lists
-% correctly (cf.~``Acrobat \pdfterm{Author} bug'' on
-% page~\pageref{page:author-bug}) we introduce a hack that replaces a
+% As a workaround for the inability of older Adobe Acrobat versions to
+% display author lists correctly we introduce a hack that replaces a
 % list with its first element.  One can then write
 % ``|\XMPTruncateList{pdfauthor}|'' and have Adobe Acrobat display the
-% author list correctly.  It's sad that this is necessary, though.
+% author list correctly.
 %    \begin{macrocode}
 \newcommand{\XMPTruncateList}[1]{{%
+    \PackageWarning{hyperxmp}{%
+      \noexpand\XMPTruncateList has been deprecated since\MessageBreak
+      hyperxmp 4.0 and may be removed in future\MessageBreak
+      versions of the package.  \noexpand\XMPTruncateList\MessageBreak
+      was found}%
   \edef\hyxmp at temp@str{\csname hyxmp@#1\endcsname}%
   \hyxmp at commas@to at list{\hyxmp at temp@list}{\hyxmp at temp@str}%
   \def\@elt##1{%
@@ -2310,7 +2746,7 @@
 \newcommand*{\hyxmp at xmlify}[1]{%
   \gdef\hyxmp at xmlified{}%
 %    \end{macrocode}
-% Escaped PDF string~$\rightarrow$ \term{PDFDocEncoding}/\term{Unicode}
+% Escaped \acro{PDF} string~$\rightarrow$ \term{PDFDocEncoding}/\term{Unicode}
 %    \begin{macrocode}
   \EdefUnescapeString\hyxmp at text{#1}%
   \ifhyxmp at unicodetex
@@ -3090,10 +3526,6 @@
 %   even when empty.  Florian Breitwieser noted that this is necessary
 %   for \protect\acro{PDF/A}-1b compliance}
 %    \begin{macrocode}
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-___________xmlns:pdf="http://ns.adobe.com/pdf/1.3/">^^J%
-  }%
   \hyxmp at add@simple at var{pdf:Keywords}{@pdfkeywords}%
   \hyxmp at add@simple at var{pdf:Producer}{@pdfproducer}%
   \@ifundefined{pdfvariable}{%
@@ -3114,15 +3546,20 @@
 %    \begin{macrocode}
     \hyxmp at add@simple{pdf:PDFVersion}{1.\the\pdfvariable minorversion}%
   }%
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
 }
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\hyxmp at extra@indent}
+% This macro is used internally to increase the amount of indentation
+% when writing certain \acro{XML} data.  It is normally defined as empty
+% but can temporarily be redefined to a sequence of |\space| characters.
+%    \begin{macrocode}
+\newcommand*{\hyxmp at extra@indent}{}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\hyxmp at add@simple}
-% \begin{macro}{\hyxmp at string}
 % Given an \acro{XMP} tag~(|#1|) and a string~(|#2|), if the string is
 % nonempty, add a begin tag, the string, and an end tag to the packet.
 % The ``|simple|'' in the macro name indicates that the string is output
@@ -3130,18 +3567,15 @@
 % \changes{v2.0}{2012/08/25}{Added this macro}
 %    \begin{macrocode}
 \newcommand*{\hyxmp at add@simple}[2]{%
-  \edef\hyxmp at string{#2}%
-  \ifx\hyxmp at string\@empty
-  \else
-    \hyxmp at xmlify{\hyxmp at string}%
+  \@ifnotmtargexp{#2}{%
+    \hyxmp at xmlify{#2}%
     \hyxmp at add@to at xml{%
-_________<#1>\hyxmp at xmlified</#1>^^J%
+      \hyxmp at extra@indent______<#1>\hyxmp at xmlified</#1>^^J%
     }%
-  \fi
+  }%
 }
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}
 %
 % \begin{macro}{\hyxmp at add@simple at var}
 % Given an \acro{XMP} tag~(|#1|) and a variable name~(|#2|), if the
@@ -3158,7 +3592,7 @@
   \else
     \hyxmp at xmlify{\csname#2\endcsname}%
     \hyxmp at add@to at xml{%
-_________<#1>\hyxmp at xmlified</#1>^^J%
+      \hyxmp at extra@indent______<#1>\hyxmp at xmlified</#1>^^J%
     }%
   \fi
 }
@@ -3165,7 +3599,58 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\hyxmp at add@simple at lang}
+% Given an \acro{XMP} tag~(|#1|) and a string~(|#2|), if the string is
+% nonempty, add a begin tag, the string, and an end tag to the packet.
+% The ``|simple|'' in the macro name indicates that the string is output
+% without variations for different languages.  However, if the string
+% begins with a language code in square brackets, specify that as the
+% (sole) language for the tag.
+% \changes{v4.0}{2019/03/12}{Added this macro}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at add@simple at lang}[2]{%
+  \@ifnotmtarg{#2}{%
+    \hyxmp at xmlify{#2}%
+    \expandafter\hyxmp at add@simple at lang@i\hyxmp at xmlified\relax{#1}%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
 %
+% \begin{macro}{\hyxmp at add@simple at lang@i}
+% This is a helper macro for |\hyxmp at add@simple at lang|.  It takes an
+% optional language code (in brackets), text up to |\relax|, and a tag,
+% and typesets the text within the \acro{XML} tag.
+%    \begin{macrocode}
+\newcommand*{\hyxmp at add@simple at lang@i}{%
+  \@ifnextchar[\hyxmp at add@simple at lang@ii{\hyxmp at add@simple at lang@ii[]}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at add@simple at lang@ii}
+% This is another helper macro for |\hyxmp at add@simple at lang|.  It takes
+% an mandatory language code (in brackets; can be empty), text up to
+% |\relax|, and a tag, and typesets the text within the \acro{XML} tag.
+%    \begin{macrocode}
+\def\hyxmp at add@simple at lang@ii[#1]#2\relax#3{%
+  \@ifnotmtarg{#2}{%
+    \hyxmp at xmlify{#2}%
+    \@ifmtarg{#1}{%
+      \hyxmp at add@to at xml{%
+______<#3>\hyxmp at xmlified</#3>^^J%
+      }%
+    }{%
+      \hyxmp at add@to at xml{%
+______<#3 xml:lang="#1">\hyxmp at xmlified</#3>^^J%
+      }%
+    }%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
 % \subsubsection{The Dublin Core schema}
 % \label{sec:dublin-core}
 %
@@ -3201,18 +3686,18 @@
 %    \begin{macrocode}
     \let\hyxmp at value=\hyxmp at xmlified
     \hyxmp at add@to at xml{%
-_________<dc:#2>^^J%
-____________<rdf:Alt>^^J%
+______<dc:#2>^^J%
+________<rdf:Alt>^^J%
     }%
     \ifx\@pdfmetalang\hyxmp at x@default
     \else
       \hyxmp at xmlify{\@pdfmetalang}%
       \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\hyxmp at xmlified">\hyxmp at value</rdf:li>^^J%
+__________<rdf:li xml:lang="\hyxmp at xmlified">\hyxmp at value</rdf:li>^^J%
       }%
     \fi
     \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at value</rdf:li>^^J%
+__________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at value</rdf:li>^^J%
     }%
 %    \end{macrocode}
 % Include variants of the text expressed in other languages, as specified by
@@ -3221,7 +3706,7 @@
     \def\do##1##2{
       \hyxmp at xmlify{##2}%
       \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="##1">\hyxmp at xmlified</rdf:li>^^J%
+__________<rdf:li xml:lang="##1">\hyxmp at xmlified</rdf:li>^^J%
       }%
     }%
     \csname hyxmp at alt@#2\endcsname
@@ -3229,8 +3714,8 @@
 % Complete this \acro{XMP} element.
 %    \begin{macrocode}
     \hyxmp at add@to at xml{%
-____________</rdf:Alt>^^J%
-_________</dc:#2>^^J%
+________</rdf:Alt>^^J%
+______</dc:#2>^^J%
     }%
   \fi
 }%
@@ -3260,8 +3745,8 @@
 %    \begin{macrocode}
   \if at tempswa
     \hyxmp at add@to at xml{%
-_________<dc:#2>^^J%
-____________<rdf:#3>^^J%
+______<dc:#2>^^J%
+________<rdf:#3>^^J%
     }%
     \bgroup
 %    \end{macrocode}
@@ -3274,14 +3759,14 @@
       \hyxmp at commas@to at list\hyxmp at list{\hyxmp at xmlified}%
       \def\@elt##1{%
         \hyxmp at add@to at xml{%
-_______________<rdf:li>##1</rdf:li>^^J%
+__________<rdf:li>##1</rdf:li>^^J%
         }%
       }%
       \hyxmp at list
     \egroup
     \hyxmp at add@to at xml{%
-____________</rdf:#3>^^J%
-_________</dc:#2>^^J%
+________</rdf:#3>^^J%
+______</dc:#2>^^J%
     }%
   \fi
 }
@@ -3310,11 +3795,7 @@
 %   \acro{XMP} specifications, a detail identified by Florian Breitwieser}
 %    \begin{macrocode}
 \newcommand*{\hyxmp at dc@schema}{%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:dc="http://purl.org/dc/elements/1.1/">^^J%
-_________<dc:format>application/pdf</dc:format>^^J%
-  }%
+  \hyxmp at add@simple{dc:format}{application/pdf}%
   \hyxmp at rdf@dc[\ifHy at pdfa]{title}{\@pdftitle}%
   \hyxmp at rdf@dc[\ifHy at pdfa]{description}{\@pdfsubject}%
   \hyxmp at rdf@dc{rights}{\@pdfcopyright}%
@@ -3327,9 +3808,6 @@
   \else
     \hyxmp at add@simple{dc:source}{\@pdfsource}%
   \fi
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -3374,32 +3852,11 @@
 %    \begin{macrocode}
   \ifx\hyxmp at rights\@empty
   \else
-%    \end{macrocode}
-% Header
-%    \begin{macrocode}
-    \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-___________xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">^^J%
-    }%
-%    \end{macrocode}
-% Copyright indication
-%    \begin{macrocode}
     \ifx\@pdfcopyright\@empty
     \else
-      \hyxmp at add@to at xml{%
-_________<xmpRights:Marked>True</xmpRights:Marked>^^J%
-      }%
+      \hyxmp at add@simple{xmpRights:Marked}{True}%
     \fi
-%    \end{macrocode}
-% License \acro{URL}
-%    \begin{macrocode}
     \hyxmp at add@simple{xmpRights:WebStatement}{\@pdflicenseurl}%
-%    \end{macrocode}
-% Trailer
-%    \begin{macrocode}
-    \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-    }%
   \fi
 }
 %    \end{macrocode}
@@ -3411,13 +3868,15 @@
 % \label{sec:xmp-media}
 %
 % \begin{macro}{\hyxmp at mm@schema}
-% Add properties defined by the \acro{XMP} Media Management schema to the
-% |\hyxmp at xml| macro.  According to the \acro{XMP} specification, the
-% \xmpterm{xmpMM:DocumentID} property is supposed to uniquely identify a
-% document, and the \xmpterm{xmpMM:InstanceID} property is supposed to
-% change with each save operation~\cite{Adobe2012:XMP}.  As seen in
-% Section~\ref{sec:uuid-gen}, we do what we can to honor this intention
-% from within a \tex-based workflow.
+% Add properties defined by the \acro{XMP} Media Management schema to
+% the |\hyxmp at xml| macro.  According to the \acro{XMP} specification,
+% the \xmpterm{xmpMM:DocumentID} property is supposed to uniquely
+% identify a document, and the \xmpterm{xmpMM:InstanceID} property is
+% supposed to change with each save operation~\cite{Adobe2012:XMP}.  As
+% seen in Section~\ref{sec:uuid-gen}, we do what we can to honor this
+% intention from within a \tex-based workflow.  We additionally support
+% the \xmpterm{xmpMM:VersionID} property, whose value is supplied by
+% the author using \optname{pdfversionid}.
 % \changes{v1.4}{2011/05/29}{Renamed the \texttt{xapMM} namespace
 %   prefix to \texttt{xmpMM}}
 % \changes{v3.5}{2018/11/27}{Generate \protect\cs{hyxmp at DocumentID} and
@@ -3424,19 +3883,15 @@
 %   \protect\cs{hyxmp at InstanceID} only if the document does not already
 %   define these using the \protect\optname{pdfdocumentid} and
 %   \protect\optname{pdfinstanceid} options}
+% \changes{v4.0}{2019/03/09}{Include \protect\xmpterm{xmpMM:VersionID} in
+%   the \protect\acro{XMP} packet}
 %    \begin{macrocode}
 \gdef\hyxmp at mm@schema{%
   \@ifmtargexp{\hyxmp at DocumentID}{\hyxmp at def@DocumentID}{}%
   \@ifmtargexp{\hyxmp at InstanceID}{\hyxmp at def@InstanceID}{}%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
-  }%
   \hyxmp at add@simple{xmpMM:DocumentID}{\hyxmp at DocumentID}%
   \hyxmp at add@simple{xmpMM:InstanceID}{\hyxmp at InstanceID}%
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
+  \hyxmp at add@simple{xmpMM:VersionID}{\@pdfversionid}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -3449,8 +3904,8 @@
 % \begin{macro}{\hyxmp at createdate}
 % Define |\hyxmp at createdate| as the document's creation date but in
 % \acro{XMP} date format, not \acro{PDF} date format.  We use
-% |\hyxmp at createdate| for the \xmpterm{CreateDate},
-% \xmpterm{ModifyDate}, and \xmpterm{MetadataDate} fields.
+% |\hyxmp at createdate| for the \xmpterm{xmp:CreateDate},
+% \xmpterm{xmp:ModifyDate}, and \xmpterm{xmp:MetadataDate} fields.
 %    \begin{macrocode}
 \newcommand*{\hyxmp at define@createdate}{%
   \@ifundefined{pdffeedback}{%
@@ -3484,8 +3939,8 @@
 % \optname{baseurl}.
 % \changes{v2.0}{2012/08/26}{Added this macro}
 % \changes{v3.0}{2016/07/04}{Made the \protect\acro{XMP}
-%   \protect\xmpterm{CreateDate}, \protect\xmpterm{ModifyDate}, and
-%   \protect\xmpterm{MetadataDate} match the \protect\acro{PDF}
+%   \protect\xmpterm{xmp:CreateDate}, \protect\xmpterm{xmp:ModifyDate},
+%   and \protect\xmpterm{xmp:MetadataDate} match the \protect\acro{PDF}
 %   \protect\pdfterm{CreationDate}}
 % \changes{v3.2}{2017/01/22}{Honor \string\pkgname{hyperref}'s
 %   \string\optname{pdfcreationdate} and \string\optname{pdfmoddate}
@@ -3494,10 +3949,6 @@
 %   \protect\pkgname{hyperxmp} code}
 %    \begin{macrocode}
 \newcommand*{\hyxmp at xmp@basic at schema}{%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:xmp="http://ns.adobe.com/xap/1.0/">^^J%
-  }%
   \hyxmp at define@createdate
 %    \end{macrocode}
 % For the document's creation date, use the user-specified
@@ -3544,9 +3995,6 @@
 %    \begin{macrocode}
   \hyxmp at add@simple{xmp:CreatorTool}{\@pdfcreator}%
   \hyxmp at add@simple{xmp:BaseURL}{\@baseurl}%
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -3566,21 +4014,8 @@
 %    \begin{macrocode}
 \gdef\hyxmp at photoshop@schema{%
   \edef\hyxmp at photoshop@data{\@pdfauthortitle\@pdfcaptionwriter}%
-  \ifx\hyxmp at photoshop@data\@empty
-  \else
-    \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">^^J%
-    }%
-  \fi
   \hyxmp at add@simple{photoshop:AuthorsPosition}{\@pdfauthortitle}%
   \hyxmp at add@simple{photoshop:CaptionWriter}{\@pdfcaptionwriter}%
-  \ifx\hyxmp at photoshop@data\@empty
-  \else
-    \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-    }%
-  \fi
 }
 %    \end{macrocode}
 % \end{macro}
@@ -3587,6 +4022,30 @@
 % \end{macro}
 %
 %
+% \subsubsection{The PDF/A Identification schema}
+% \label{sec:pdfa-id}
+%
+% \begin{macro}{\hyxmp at pdfa@id at schema}
+% Add properties defined by the \acro{PDF/A} Identification
+% schema~\cite{PDFA2008:xmp-props} to the |\hyxmp at xml| macro.  These
+% properties identify a document as conforming to a particular
+% \acro{PDF/A} standard.  We default to \acro{PDF/A}-1b if any \acro{PDF/A}
+% compliance is detected but let the author override the ``1'' with
+% \optname{pdfapart} and the ``B'' with \optname{pdfaconformance}.
+% \changes{v2.4}{2013/12/21}{Added this macro}
+% \changes{v2.9}{2016/04/12}{Let the author specify the \protect\acro{PDF/A}
+%   part and conformance IDs, as requested by Leonid Sinev}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at pdfa@id at schema}{%
+  \ifHy at pdfa
+    \hyxmp at add@simple{pdfaid:part}{\@pdfapart}%
+    \hyxmp at add@simple{pdfaid:conformance}{\@pdfaconformance}%
+  \fi
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
 % \subsubsection{The IPTC Photo Metadata schema}
 % \label{sec:photo-meta}
 %
@@ -3615,7 +4074,7 @@
   \@ifnotmtargexp{#2}{%
     \bgroup
       \hyxmp at add@to at xml{%
-_________<#1>%
+        \hyxmp at extra@indent______<#1>%
       }%
 %    \end{macrocode}
 % \begin{macro}{\@elt at first}
@@ -3652,51 +4111,51 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\hyxmp at photometa@schema}
+% \begin{macro}{\hyxmp at iptc@schema}
+% Add properties defined by the \acro{IPTC} Photo Metadata
+% schema~\cite{IPTC2010:photo-meta} to the |\hyxmp at xml| macro.  We
+% currently support only the \xmpterm{Iptc4xmpCore:CreatorContactInfo}
+% property, although this is a structure containing multiple fields.
 % \changes{v2.2}{2012/12/07}{Added this macro}
 % \changes{v2.9}{2016/04/23}{Use \textsf{Iptc4xmpCore} instead of
 %   \textsf{Iptc4ContInfo} as the contact-information metadata prefix.
 %   Leonid Sinev reports that Acrobat's \acro{PDF/A} validator seems to
 %   prefer \textsf{Iptc4xmpCore}}
-% \begin{macro}{\hyxmp at photometa@data}
-% Add properties defined by the \acro{IPTC} Photo Metadata
-% schema~\cite{IPTC2010:photo-meta} to the |\hyxmp at xml| macro.  We
-% currently support only the contact-information details structure,
-% viz.\ the \xmpterm[CiAdrExtadr]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiAdrCity]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiAdrRegion]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiAdrPcode]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiAdrCtry]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiTelWork]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiEmailWork]{Iptc4xmpCore:CreatorContactInfo}, and
-% \xmpterm[CiUrlWork]{Iptc4xmpCore:CreatorContactInfo} properties.
+% \changes{v4.0}{2019/03/09}{Moved the definition of
+%   \protect\cs{hyxmp at iptc@data} from here into
+%   \protect\cs{hyxmp at check@iptc at data}}
+% \changes{v4.0}{2019/03/16}{Renamed this macro to
+%   \protect\cs{hyxmp at iptc@schema} from
+%   \protect\cs{hyxmp at photometa@schema}}
+% \changes{v4.0}{2019/03/16}{Rewrote this macro entirely to correct
+%   the use of fields within a structure}
 %    \begin{macrocode}
-\gdef\hyxmp at photometa@schema{%
-  \edef\hyxmp at photometa@data{%
-    \@pdfcontactaddress
-    \@pdfcontactcity
-    \@pdfcontactregion
-    \@pdfcontactpostcode
-    \@pdfcontactcountry
-    \@pdfcontactphone
-    \@pdfcontactemail
-    \@pdfcontacturl
-  }%
-  \ifx\hyxmp at photometa@data\@empty
+\gdef\hyxmp at iptc@schema{%
+%    \end{macrocode}
+% Because we currently support only
+% \xmpterm{Iptc4xmpCore:CreatorContactInfo} it suffices to check if we
+% have any relevant data.  If so, we instantiate a
+% \xmpterm{Iptc4xmpCore:ContactInfo} structure with all available
+% fields.
+%    \begin{macrocode}
+  \ifx\hyxmp at iptc@data\@empty
   \else
-    \hyxmp at iptc@extensions
     \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-___________xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/">^^J%
-_______<Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">^^J%
+______<Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">^^J%
     }%
-  \fi
-  \hyxmp at list@to at lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}%
 %    \end{macrocode}
+% We locally redefine |\hyxmp at extra@indent| to increase the indentation
+% of the assignments to \xmpterm{Iptc4xmpCore:CreatorContactInfo}'s
+% fields.
+%    \begin{macrocode}
+    \bgroup
+      \edef\hyxmp at extra@indent{\hyxmp at extra@indent\space\space}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}%
+%    \end{macrocode}
 % \begin{macro}{\xmplinesep}
 % The \acro{IPTC} standard states that sets of telephone numbers, email
 % addresses, and \acro{URL}s for the contact person or institution,
@@ -3708,17 +4167,13 @@
 % |\hyxmp at list@to at lines| to insert the data.  Unlike
 % |\hyxmp at add@simple|, this approach trims all spaces surrounding commas.
 %    \begin{macrocode}
-  \bgroup
-    \def\xmplinesep{,}%
-    \hyxmp at list@to at lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}%
-    \hyxmp at list@to at lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}%
-    \hyxmp at list@to at lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}%
-  \egroup
-  \ifx\hyxmp at photometa@data\@empty
-  \else
+      \def\xmplinesep{,}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}%
+    \egroup
     \hyxmp at add@to at xml{%
-_______</Iptc4xmpCore:CreatorContactInfo>^^J%
-______</rdf:Description>^^J%
+______</Iptc4xmpCore:CreatorContactInfo>^^J%
     }%
   \fi
 }
@@ -3725,8 +4180,248 @@
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
+%
+% \subsubsection{The PRISM Basic Metadata schema}
+% \label{sec:prism-meta}
+%
+% \begin{macro}{\hyxmp at prism@schema}
+% \changes{v4.0}{2019/03/10}{Added this macro}
+% Add properties defined by the \acro{PRISM} Basic Metadata
+% schema~\cite{PRISM2012:basic-meta}.
+%    \begin{macrocode}
+\newcommand*{\hyxmp at prism@schema}{%
+  \ifx\hyxmp at prism@data\@empty
+  \else
+    \hyxmp at add@simple{prism:complianceProfile}{three}%
+  \fi
+  \hyxmp at add@simple at lang{prism:subtitle}{\@pdfsubtitle}%
+  \hyxmp at add@simple at lang{prism:publicationName}{\@pdfpublication}%
+  \hyxmp at add@simple{prism:aggregationType}{\@pdfpubtype}%
+  \hyxmp at add@simple at lang{prism:bookEdition}{\@pdfbookedition}%
+  \hyxmp at add@simple{prism:volume}{\@pdfvolumenum}%
+  \hyxmp at add@simple{prism:number}{\@pdfissuenum}%
+  \hyxmp at add@simple{prism:pageRange}{\@pdfpagerange}%
+  \hyxmp at add@simple{prism:isbn}{\@pdfisbn}%
+  \hyxmp at add@simple{prism:issn}{\@pdfissn}%
+  \hyxmp at add@simple{prism:eIssn}{\@pdfeissn}%
+  \hyxmp at add@simple{prism:doi}{\@pdfdoi}%
+  \hyxmp at add@simple{prism:url}{\@pdfurl}%
+  \hyxmp at add@simple{prism:byteCount}{\@pdfbytes}%
+  \hyxmp at add@simple{prism:pageCount}{\@pdfnumpages}%
+}
+%    \end{macrocode}
 % \end{macro}
 %
+% \subsubsection{XMP extension schemata}
+% \label{sec:extension-schemata}
+%
+% Not all of the schemata supported by \pkgname{hyperxmp} are predefined
+% by \acro{XMP}.  \acro{PDF/A} conversion would normally fail for
+% documents that employ ``custom'' schemata.  However, this problem can
+% be circumvented by declaring non-standard schemata in the \acro{XMP}
+% packet itself, following a technique described in a PDF Association
+% technical note~\cite{PDFA2008:ext-schemas}.  In this section, we
+% declare only those schemata we actually use.
+%
+% \begin{macro}{\hyxmp at check@iptc at data}
+% Define |\hyxmp at iptc@data| as the concatenation of all \acro{IPTC}
+% photo metadata supplied by the document.
+%    \begin{macrocode}
+\newcommand*{\hyxmp at check@iptc at data}{%
+%    \end{macrocode}
+% \begin{macro}{\hyxmp at iptc@data}
+%    \begin{macrocode}
+  \edef\hyxmp at iptc@data{%
+    \@pdfcontactaddress
+    \@pdfcontactcity
+    \@pdfcontactregion
+    \@pdfcontactpostcode
+    \@pdfcontactcountry
+    \@pdfcontactphone
+    \@pdfcontactemail
+    \@pdfcontacturl
+  }%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at check@prism at data}
+% Define |\hyxmp at prism@data| as the concatenation of all \acro{PRISM}
+% metadata supplied by the document.
+%    \begin{macrocode}
+\newcommand*{\hyxmp at check@prism at data}{%
+%    \end{macrocode}
+% \begin{macro}{\hyxmp at prism@data}
+%    \begin{macrocode}
+  \edef\hyxmp at prism@data{%
+    \@pdfbookedition
+    \@pdfbytes
+    \@pdfdoi
+    \@pdfeissn
+    \@pdfisbn
+    \@pdfissn
+    \@pdfissuenum
+    \@pdfnumpages
+    \@pdfpagerange
+    \@pdfpublication
+    \@pdfpubtype
+    \@pdfsubtitle
+    \@pdfurl
+    \@pdfvolumenum
+  }%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at begin@extension at decls}
+% Begin a block of \acro{XML} tags that indicates we're declaring one or
+% more extension schemata.
+%    \begin{macrocode}
+\newcommand*{\hyxmp at begin@extension at decls}{%
+  \hyxmp at add@to at xml{%
+______<pdfaExtension:schemas>^^J%
+________<rdf:Bag>^^J%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at end@extension at decls}
+% End the block of \acro{XML} tags begun by |\hyxmp at begin@extension at decls|.
+%    \begin{macrocode}
+\newcommand*{\hyxmp at end@extension at decls}{%
+  \hyxmp at add@to at xml{%
+________</rdf:Bag>^^J%
+______</pdfaExtension:schemas>^^J%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at begin@ext at decl}
+% Begin the declaration of a single extension schema.
+% |\hyxmp at begin@ext at decl| accepts the schema's name, prefix, and
+% namespace URI.
+% \changes{v4.0}{2019/03/15}{Added this macro}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at begin@ext at decl}[3]{%
+  \hyxmp at add@to at xml{%
+__________<rdf:li rdf:parseType="Resource">^^J%
+____________<pdfaSchema:schema>#1</pdfaSchema:schema>^^J%
+____________<pdfaSchema:prefix>#2</pdfaSchema:prefix>^^J%
+____________<pdfaSchema:namespaceURI>#3</pdfaSchema:namespaceURI>^^J%
+____________<pdfaSchema:property>^^J%
+______________<rdf:Seq>^^J%
+  }%
+}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at end@ext at decl}
+% End the declaration of a single extension schema.
+% \changes{v4.0}{2019/03/15}{Added this macro}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at end@ext at decl}{%
+  \hyxmp at add@to at xml{%
+______________</rdf:Seq>^^J%
+____________</pdfaSchema:property>^^J%
+__________</rdf:li>^^J%
+  }%
+}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at declare@property}
+% Declare a single extension-schema property.  |\hyxmp at declare@property|
+% takes as input an optional type (defaults to \xmpterm{Text}) and a
+% mandatory name, category, and description.
+% \changes{v4.0}{2019/03/15}{Added this macro}
+%    \begin{macrocode}
+\newcommand{\hyxmp at declare@property}[4][Text]{%
+  \hyxmp at add@to at xml{%
+________________<rdf:li rdf:parseType="Resource">^^J%
+__________________<pdfaProperty:name>#2</pdfaProperty:name>^^J%
+__________________<pdfaProperty:valueType>#1</pdfaProperty:valueType>^^J%
+__________________<pdfaProperty:category>#3</pdfaProperty:category>^^J%
+__________________<pdfaProperty:description>#4</pdfaProperty:description>^^J%
+________________</rdf:li>^^J%
+  }%
+}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at declare@field}
+% Declare a single field in a custom datatype required by an extension
+% schema.  |\hyxmp at declare@field| takes as input an optional type
+% (defaults to \xmpterm{Text}) and a mandatory name and description.
+% \changes{v4.0}{2019/03/16}{Replaced
+%   \protect\cs{hyxmp at declare@resource} with this macro}
+%    \begin{macrocode}
+\newcommand{\hyxmp at declare@field}[3][Text]{%
+  \hyxmp at add@to at xml{%
+______________________<rdf:li rdf:parseType="Resource">^^J%
+________________________<pdfaField:name>#2</pdfaField:name>^^J%
+________________________<pdfaField:valueType>#1</pdfaField:valueType>^^J%
+________________________<pdfaField:description>#3</pdfaField:description>^^J%
+______________________</rdf:li>^^J%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at mm@extensions}
+% Declare the \acro{XMP} Media Management schema.
+% \changes{v4.0}{2019/03/15}{Added this macro}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at mm@extensions}{%
+  \hyxmp at begin@ext at decl
+      {XMP Media Management Schema}%
+      {xmpMM}%
+      {http://ns.adobe.com/xap/1.0/mm/}%
+  \hyxmp at declare@property
+      [URI]
+      {DocumentID}%
+      {internal}%
+      {UUID based identifier for all versions and renditions of a document}%
+  \hyxmp at declare@property
+      [URI]
+      {InstanceID}%
+      {internal}%
+      {UUID based identifier for specific incarnation of a document}%
+  \hyxmp at declare@property
+      {VersionID}%
+      {internal}%
+      {Document version identifier}%
+  \hyxmp at end@ext at decl
+}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at pdfa@id at extensions}
+% Declare the \acro{PDF/A} Identification schema~\cite{PDFA2008:xmp-props}.
+% \changes{v4.0}{2019/03/15}{Added this macro}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at pdfa@id at extensions}{%
+  \hyxmp at begin@ext at decl
+      {PDF/A Identification Schema}%
+      {pdfaid}%
+      {http://www.aiim.org/pdfa/ns/id/}%
+  \hyxmp at declare@property
+      [Integer]%
+      {part}%
+      {internal}%
+      {Part of PDF/A standard}%
+  \hyxmp at declare@property
+      {conformance}%
+      {internal}%
+      {Conformance level of PDF/A standard}%
+  \hyxmp at end@ext at decl
+}%
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\hyxmp at iptc@extensions}
 % \changes{v2.2}{2012/12/13}{Added this macro to support
 %   \acro{PDF/A} generation}
@@ -3734,124 +4429,204 @@
 %   \xmpterm{Iptc4xmpCore:CreatorContactInfo} fields a unique
 %   \xmpterm{pdfaType:prefix} to better support conversion of the
 %   document to \acro{PDF/A}}
+% \changes{v4.0}{2019/03/09}{Moved the header code from here into
+%   \protect\cs{hyxmp at begin@extension at decls} and the trailer code
+%   from here into \protect\cs{hyxmp at end@extension at decls}}
+% \changes{v4.0}{2019/03/16}{Rewrote to more closely honor the
+%   \acro{XMP} specification}
 % Because \acro{IPTC} metadata are not recognized by the \acro{PDF/A}
 % standard, \acro{PDF/A} conversion would normally fail for documents
-% that utilize |\pdfcontactaddress|, |\pdfcontactcity|, etc.  However,
-% there exists a technique, described in a PDF Association technical
-% note~\cite{PDFA2008:ext-schemas}, for describing nonstandard
-% \acro{XMP} metadata within the \acro{XMP} packet itself.  We use that
-% technique here to describe all of the metadata that
-% |\hyxmp at photometa@schema| can produce.  Doing so enables the document
-% to be converted to \acro{PDF/A} format.
+% that utilize \acro{IPTC} metadata.  Declaring the \acro{IPTC}
+% metadata we support enables the document to be converted to
+% \acro{PDF/A} format.
 %    \begin{macrocode}
 \newcommand*{\hyxmp at iptc@extensions}{%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-__________xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"^^J%
-__________xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema\hyxmp@hash"^^J%
-__________xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property\hyxmp@hash"^^J%
-__________xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type\hyxmp@hash"^^J%
-__________xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field\hyxmp@hash">^^J%
-________<pdfaExtension:schemas>^^J%
-__________<rdf:Bag>^^J%
-____________<rdf:li rdf:parseType="Resource">^^J%
-______________<pdfaSchema:schema>IPTC Core Schema</pdfaSchema:schema>^^J%
-______________<pdfaSchema:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaSchema:namespaceURI>^^J%
-______________<pdfaSchema:prefix>Iptc4xmpCore</pdfaSchema:prefix>^^J%
-______________<pdfaSchema:property>^^J%
-________________<rdf:Seq>^^J%
-__________________<rdf:li rdf:parseType="Resource">^^J%
-____________________<pdfaProperty:name>CreatorContactInfo</pdfaProperty:name>^^J%
-____________________<pdfaProperty:valueType>contactinfo</pdfaProperty:valueType>^^J%
-____________________<pdfaProperty:category>external</pdfaProperty:category>^^J%
-____________________<pdfaProperty:description>contact information for the document's creator</pdfaProperty:description>^^J%
-__________________</rdf:li>^^J%
-________________</rdf:Seq>^^J%
-______________</pdfaSchema:property>^^J%
-______________<pdfaSchema:valueType>^^J%
-________________<rdf:Seq>^^J%
-__________________<rdf:li rdf:parseType="Resource">^^J%
-____________________<pdfaType:type>contactinfo</pdfaType:type>^^J%
-____________________<pdfaType:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaType:namespaceURI>^^J%
-____________________<pdfaType:prefix>Iptc4xmpCore</pdfaType:prefix>^^J%
-____________________<pdfaType:description>contact information</pdfaType:description>^^J%
-____________________<pdfaType:field>^^J%
-______________________<rdf:Seq>^^J%
-  }%
+  \hyxmp at begin@ext at decl
+      {IPTC Core Schema}%
+      {Iptc4xmpCore}%
+      {http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/}%
+  \hyxmp at declare@property
+      [ContactInfo]
+      {CreatorContactInfo}
+      {external}
+      {Document creator's contact information}
 %    \end{macrocode}
+% We can't call |\hyxmp at end@ext at decl| because we need first need to
+% define the \xmpterm{Iptc4xmpCore:ContactInfo} structure.
 %    \begin{macrocode}
-  \hyxmp at text@resource{CiAdrExtadr}{contact address}%
-  \hyxmp at text@resource{CiAdrCity}{contact city}%
-  \hyxmp at text@resource{CiAdrRegion}{contact region}%
-  \hyxmp at text@resource{CiAdrPcode}{contact postal code}%
-  \hyxmp at text@resource{CiAdrCtry}{contact country}%
-  \hyxmp at text@resource{CiTelWork}{contact telephone number}%
-  \hyxmp at text@resource{CiEmailWork}{contact email address}%
-  \hyxmp at text@resource{CiUrlWork}{contact url}%
-%    \end{macrocode}
-%    \begin{macrocode}
   \hyxmp at add@to at xml{%
-______________________</rdf:Seq>^^J%
-____________________</pdfaType:field>^^J%
-__________________</rdf:li>^^J%
-________________</rdf:Seq>^^J%
-______________</pdfaSchema:valueType>^^J%
-____________</rdf:li>^^J%
-__________</rdf:Bag>^^J%
-________</pdfaExtension:schemas>^^J%
-______</rdf:Description>^^J%
+______________</rdf:Seq>^^J%
+____________</pdfaSchema:property>^^J%
+____________<pdfaSchema:valueType>^^J%
+______________<rdf:Seq>^^J%
+________________<rdf:li rdf:parseType="Resource">^^J%
+__________________<pdfaType:type>ContactInfo</pdfaType:type>^^J%
+__________________<pdfaType:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaType:namespaceURI>^^J%
+__________________<pdfaType:prefix>Iptc4xmpCore</pdfaType:prefix>^^J%
+__________________<pdfaType:description>%
+                   Basic set of information to get in contact with a person%
+                 </pdfaType:description>^^J%
+__________________<pdfaType:field>^^J%
+____________________<rdf:Seq>^^J%
   }%
+  \hyxmp at declare@field
+      {CiAdrCity}%
+      {Contact information city}%
+  \hyxmp at declare@field
+      {CiAdrCtry}%
+      {Contact information country}%
+  \hyxmp at declare@field
+      {CiAdrExtadr}%
+      {Contact information address}%
+  \hyxmp at declare@field
+      {CiAdrPcode}%
+      {Contact information local postal code}%
+  \hyxmp at declare@field
+      {CiAdrRegion}%
+      {Contact information regional information such as state or province}%
+  \hyxmp at declare@field
+      {CiEmailWork}%
+      {Contact information email address(es)}%
+  \hyxmp at declare@field
+      {CiTelWork}%
+      {Contact information telephone number(s)}%
+  \hyxmp at declare@field
+      {CiUrlWork}%
+      {Contact information Web URL(s)}%
+  \hyxmp at add@to at xml{%
+____________________</rdf:Seq>^^J%
+__________________</pdfaType:field>^^J%
+________________</rdf:li>^^J%
+______________</rdf:Seq>^^J%
+____________</pdfaSchema:valueType>^^J%
+__________</rdf:li>^^J%
+  }%
 }
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\hyxmp at text@resource}
-% \changes{v2.2}{2012/12/13}{Added this macro}
-% Output a single \xmpterm{Text} resource given its name and description.
+% \begin{macro}{\hyxmp at prism@extensions}
+% \changes{v4.0}{2019/03/15}{Added this macro}
+% Because \acro{PRISM} metadata are not recognized by the \acro{PDF/A}
+% standard, \acro{PDF/A} conversion would normally fail for documents
+% that utilize \acro{PRISM} metadata.  Declaring the \acro{PRISM}
+% metadata we support enables the document to be converted to
+% \acro{PDF/A} format.
 %    \begin{macrocode}
-\newcommand*{\hyxmp at text@resource}[2]{%
-  \hyxmp at add@to at xml{%
-________________________<rdf:li rdf:parseType="Resource">^^J%
-__________________________<pdfaField:name>#1</pdfaField:name>^^J%
-__________________________<pdfaField:valueType>Text</pdfaField:valueType>^^J%
-__________________________<pdfaField:description>#2</pdfaField:description>^^J%
-________________________</rdf:li>^^J%
-  }
-}
+\newcommand*{\hyxmp at prism@extensions}{%
+  \hyxmp at begin@ext at decl
+      {PRISM Basic Metadata}%
+      {prism}%
+      {http://prismstandard.org/namespaces/basic/2.1/}%
+  \hyxmp at declare@property
+      {complianceProfile}%
+      {internal}%
+      {PRISM specification compliance profile to which this document adheres}%
+  \hyxmp at declare@property
+      {publicationName}%
+      {external}%
+      {Publication name}%
+  \hyxmp at declare@property
+      {aggregationType}%
+      {external}%
+      {Publication type}%
+  \hyxmp at declare@property
+      {bookEdition}%
+      {external}%
+      {Edition of the book in which the document was published}%
+  \hyxmp at declare@property
+      {volume}%
+      {external}%
+      {Publication volume number}%
+  \hyxmp at declare@property
+      {number}%
+      {external}%
+      {Publication issue number within a volume}%
+  \hyxmp at declare@property
+      {pageRange}%
+      {external}%
+      {Page range for the document within the print version of its publication}%
+  \hyxmp at declare@property
+      {issn}%
+      {external}%
+      {ISSN for the printed publication in which the document was published}%
+  \hyxmp at declare@property
+      {eIssn}%
+      {external}%
+      {ISSN for the electronic publication in which the document was published}%
+  \hyxmp at declare@property
+      {isbn}%
+      {external}%
+      {ISBN for the publication in which the document was published}%
+  \hyxmp at declare@property
+      {doi}%
+      {external}%
+      {Digital Object Identifier for the document}%
+  \hyxmp at declare@property
+      [URL]
+      {url}%
+      {external}%
+      {URL at which the document can be found}%
+  \hyxmp at declare@property
+      [Integer]
+      {byteCount}%
+      {internal}%
+      {Approximate file size in octets}%
+  \hyxmp at declare@property
+      [Integer]
+      {pageCount}%
+      {internal}%
+      {Number of pages in the print version of the document}%
+  \hyxmp at declare@property
+      {subtitle}%
+      {external}%
+      {Document's subtitle}%
+  \hyxmp at end@ext at decl
+}%
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsubsection{The PDF/A Identification schema}
-% \label{sec:pdfa-id}
-%
-% \begin{macro}{\hyxmp at pdfa@id at schema}
-% Add properties defined by the \acro{PDF/A} Identification
-% schema~\cite{PDFA2008:xmp-props} to the |\hyxmp at xml| macro.  These
-% properties identify a document as conforming to a particular
-% \acro{PDF/A} standard.  We default to \acro{PDF/A}-1b if any \acro{PDF/A}
-% compliance is detected but let the author override the ``1'' with
-% \optname{pdfapart} and the ``B'' with \optname{pdfaconformance}.
-% \changes{v2.4}{2013/12/21}{Added this macro}
-% \changes{v2.9}{2016/04/12}{Let the author specify the \protect\acro{PDF/A}
-%   part and conformance IDs, as requested by Leonid Sinev}
+% \begin{macro}{\hyxmp at declare@extensions}
+% Declare all \acro{XMP} extension schemata.  We'll always have at least
+% one, the \acro{XMP} Media Management extensions, because we
+% automatically generate \xmpterm{xmpMM:DocumentID} and
+% \xmpterm{xmpMM:InstanceID}
+% values.
 %    \begin{macrocode}
-\newcommand*{\hyxmp at pdfa@id at schema}{%
+\newcommand*{\hyxmp at declare@extensions}{%
+  \hyxmp at begin@extension at decls
+%    \end{macrocode}
+% Declare the \acro{XMP} Media Management extensions (always present).
+%    \begin{macrocode}
+  \hyxmp at mm@extensions
+%    \end{macrocode}
+% Declare the \acro{PDF/A} Identification extensions, but only when
+% generating a \acro{PDF/A} document.
+%    \begin{macrocode}
   \ifHy at pdfa
-    \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">^^J%
-    }%
-    \hyxmp at add@simple{pdfaid:part}{\@pdfapart}%
-    \hyxmp at add@simple{pdfaid:conformance}{\@pdfaconformance}%
-    \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-    }%
+    \hyxmp at mm@extensions
   \fi
+%    \end{macrocode}
+% Conditionally declare \acro{IPTC} photo metadata extensions.
+%    \begin{macrocode}
+  \ifx\hyxmp at iptc@data\@empty
+  \else
+    \hyxmp at iptc@extensions
+  \fi
+%    \end{macrocode}
+% Conditionally declare \acro{PRISM} basic metadata extensions.
+%    \begin{macrocode}
+  \ifx\hyxmp at prism@data\@empty
+  \else
+    \hyxmp at prism@extensions
+  \fi
+%    \end{macrocode}
+%    \begin{macrocode}
+  \hyxmp at end@extension at decls
 }
 %    \end{macrocode}
 % \end{macro}
 %
-%
 % \subsubsection{Combining schemata into an XMP packet}
 % \label{sec:combining-schemata}
 %
@@ -3891,20 +4666,51 @@
   \gdef\hyxmp at xml{}%
   \hyxmp at add@to at xml{<?xpacket begin="\hyxmp at bom" %
 id="W5M0MpCehiHzreSzNTczkc9d"?>^^J%
-<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-702">^^J%
-___<rdf:RDF
+<x:xmpmeta xmlns:x="adobe:ns:meta/">^^J%
+__<rdf:RDF %
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns\hyxmp@hash">^^J%
+____<rdf:Description rdf:about=""^^J%
+%    \end{macrocode}
+% Specify every namespace we can potentially use, even the ones we end
+% up not actually using.
+%    \begin{macrocode}
+_____________________xmlns:pdf="http://ns.adobe.com/pdf/1.3/"^^J%
+_____________________xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"^^J%
+_____________________xmlns:dc="http://purl.org/dc/elements/1.1/"^^J%
+_____________________xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"^^J%
+_____________________xmlns:xmp="http://ns.adobe.com/xap/1.0/"^^J%
+_____________________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"^^J%
+_____________________xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent\hyxmp@hash"^^J%
+_____________________xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"^^J%
+_____________________xmlns:prism="http://prismstandard.org/namespaces/basic/2.1/"^^J%
+_____________________xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"^^J%
+_____________________xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"^^J%
+_____________________xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema\hyxmp@hash"^^J%
+_____________________xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property\hyxmp@hash"^^J%
+_____________________xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type\hyxmp@hash"^^J%
+_____________________xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field\hyxmp@hash">^^J%
   }%
+%    \end{macrocode}
+% Declare non-standard schemata.
+%    \begin{macrocode}
+  \hyxmp at check@iptc at data
+  \hyxmp at check@prism at data
+  \hyxmp at declare@extensions
+%    \end{macrocode}
+% Insert all the metadata we know how to insert.
+%    \begin{macrocode}
   \hyxmp at pdf@schema
   \hyxmp at xmpRights@schema
   \hyxmp at dc@schema
   \hyxmp at photoshop@schema
-  \hyxmp at photometa@schema
   \hyxmp at xmp@basic at schema
   \hyxmp at pdfa@id at schema
   \hyxmp at mm@schema
+  \hyxmp at iptc@schema
+  \hyxmp at prism@schema
   \hyxmp at add@to at xml{%
-___</rdf:RDF>^^J%
+____</rdf:Description>^^J%
+__</rdf:RDF>^^J%
 </x:xmpmeta>^^J%
 \hyxmp at padding
 <?xpacket end="w"?>^^J%
@@ -3975,8 +4781,8 @@
 % uncompress \emph{every} \acro{PDF} stream.  The solution, provided by
 % Hans Hagen on the |luatex| mailing list (thread:
 % \href{http://tug.org/pipermail/luatex/2016-July/006077.html}{``Leaving
-%   a single PDF object uncompressed''}, 6\,\textsc{Jul}\,2016), is to
-% provide the |uncompressed| flag to |\pdfobj|.  Our definition of
+%   a single \acro{PDF} object uncompressed''}, 6\,\textsc{Jul}\,2016),
+% is to provide the |uncompressed| flag to |\pdfobj|.  Our definition of
 % |\hyxmp at embed@packet at pdftex| uses the \pkgname{ifluatex} package to
 % distinguish the \pdfTeX\ case from the pre-0.85 \LuaTeX\ case.
 %

Modified: trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2019-04-02 21:12:09 UTC (rev 50712)
+++ trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2019-04-02 21:12:27 UTC (rev 50713)
@@ -22,7 +22,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{hyperxmp}
-    [2019/02/25 v3.5a Store hyperref metadata in XMP format]
+    [2019/03/31 v4.0 Store hyperref metadata in XMP format]
 \edef\hyxmp at dq@code{\the\catcode`\"}
 \catcode`\"=12
 \def\hyxmp at driver{hpdftex}
@@ -90,6 +90,36 @@
 \define at key{Hyp}{pdfdocumentid}{\hyxmp at pdfstringdef\hyxmp at DocumentID{#1}}
 \def\hyxmp at InstanceID{}
 \define at key{Hyp}{pdfinstanceid}{\hyxmp at pdfstringdef\hyxmp at InstanceID{#1}}
+\def\@pdfversionid{}
+\define at key{Hyp}{pdfversionid}{\hyxmp at pdfstringdef\@pdfversionid{#1}}
+\def\@pdfpublication{}
+\define at key{Hyp}{pdfpublication}{\hyxmp at pdfstringdef\@pdfpublication{#1}}
+\def\@pdfpubtype{}
+\define at key{Hyp}{pdfpubtype}{\hyxmp at pdfstringdef\@pdfpubtype{#1}}
+\def\@pdfbytes{}
+\define at key{Hyp}{pdfbytes}{\hyxmp at pdfstringdef\@pdfbytes{#1}}
+\def\@pdfnumpages{}
+\define at key{Hyp}{pdfnumpages}{\hyxmp at pdfstringdef\@pdfnumpages{#1}}
+\def\@pdfissn{}
+\define at key{Hyp}{pdfissn}{\hyxmp at pdfstringdef\@pdfissn{#1}}
+\def\@pdfeissn{}
+\define at key{Hyp}{pdfeissn}{\hyxmp at pdfstringdef\@pdfeissn{#1}}
+\def\@pdfisbn{}
+\define at key{Hyp}{pdfisbn}{\hyxmp at pdfstringdef\@pdfisbn{#1}}
+\def\@pdfbookedition{}
+\define at key{Hyp}{pdfbookedition}{\hyxmp at pdfstringdef\@pdfbookedition{#1}}
+\def\@pdfvolumenum{}
+\define at key{Hyp}{pdfvolumenum}{\hyxmp at pdfstringdef\@pdfvolumenum{#1}}
+\def\@pdfissuenum{}
+\define at key{Hyp}{pdfissuenum}{\hyxmp at pdfstringdef\@pdfissuenum{#1}}
+\def\@pdfpagerange{}
+\define at key{Hyp}{pdfpagerange}{\hyxmp at pdfstringdef\@pdfpagerange{#1}}
+\def\@pdfdoi{}
+\define at key{Hyp}{pdfdoi}{\hyxmp at pdfstringdef\@pdfdoi{#1}}
+\def\@pdfurl{}
+\define at key{Hyp}{pdfurl}{\hyxmp at pdfstringdef\@pdfurl{#1}}
+\def\@pdfsubtitle{}
+\define at key{Hyp}{pdfsubtitle}{\hyxmp at pdfstringdef\@pdfsubtitle{#1}}
 \def\@pdfcontactaddress{}
 \define at key{Hyp}{pdfcontactaddress}{%
   \let\xmpcomma=\hyxmp at comma
@@ -112,6 +142,12 @@
 \define at key{Hyp}{pdfcontactemail}{\hyxmp at pdfstringdef\@pdfcontactemail{#1}}
 \def\@pdfcontacturl{}
 \define at key{Hyp}{pdfcontacturl}{\hyxmp at pdfstringdef\@pdfcontacturl{#1}}
+\def\hyxmp at suppress@pdf at metadata{%
+  \global\let\PDF at FinishDoc=\@empty
+}
+\define at key{Hyp}{keeppdfinfo}[true]{%
+  \gdef\hyxmp at suppress@pdf at metadata{}%
+}
 \def\hyxmp at pdfauthor{}
 \def\hyxmp at pdfkeywords{}
 \newcommand*{\hyxmp at redefine@Hyp}{%
@@ -169,6 +205,8 @@
     \@baseurl
     \@pdfauthor
     \@pdfauthortitle
+    \@pdfbookedition
+    \@pdfbytes
     \@pdfcaptionwriter
     \@pdfcontactaddress
     \@pdfcontactcity
@@ -181,14 +219,27 @@
     \@pdfcopyright
     \@pdfcreationdate
     \@pdfdatetime
+    \@pdfdoi
+    \@pdfeissn
+    \@pdfisbn
+    \@pdfissn
+    \@pdfissuenum
     \@pdfkeywords
     \@pdflang
     \@pdflicenseurl
     \@pdfmetadatetime
     \@pdfmoddate
+    \@pdfnumpages
+    \@pdfpagerange
+    \@pdfpublication
+    \@pdfpubtype
     \@pdfsubject
+    \@pdfsubtitle
     \@pdftitle
     \@pdftype
+    \@pdfurl
+    \@pdfversionid
+    \@pdfvolumenum
   }%
   \ifx\hyxmp at concated@metadata\@empty
     \PackageWarningNoLine{hyperxmp}{%
@@ -228,6 +279,7 @@
     }%
     {}%
     \hyxmp at at@end{%
+      \hyxmp at suppress@pdf at metadata
       \hyxmp at find@metadata
       \hyxmp at embed@packet
     }%
@@ -270,6 +322,11 @@
   \gdef\xmptilde{~}%
 \egroup
 \newcommand{\XMPTruncateList}[1]{{%
+    \PackageWarning{hyperxmp}{%
+      \noexpand\XMPTruncateList has been deprecated since\MessageBreak
+      hyperxmp 4.0 and may be removed in future\MessageBreak
+      versions of the package.  \noexpand\XMPTruncateList\MessageBreak
+      was found}%
   \edef\hyxmp at temp@str{\csname hyxmp@#1\endcsname}%
   \hyxmp at commas@to at list{\hyxmp at temp@list}{\hyxmp at temp@str}%
   \def\@elt##1{%
@@ -772,10 +829,6 @@
 \xdef\hyxmp at padding{\hyxmp at padding\hyxmp at padding}
 \newcommand*{\hyxmp at x@default}{x-default}
 \newcommand*{\hyxmp at pdf@schema}{%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-___________xmlns:pdf="http://ns.adobe.com/pdf/1.3/">^^J%
-  }%
   \hyxmp at add@simple at var{pdf:Keywords}{@pdfkeywords}%
   \hyxmp at add@simple at var{pdf:Producer}{@pdfproducer}%
   \@ifundefined{pdfvariable}{%
@@ -786,19 +839,15 @@
   }{%
     \hyxmp at add@simple{pdf:PDFVersion}{1.\the\pdfvariable minorversion}%
   }%
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
 }
+\newcommand*{\hyxmp at extra@indent}{}
 \newcommand*{\hyxmp at add@simple}[2]{%
-  \edef\hyxmp at string{#2}%
-  \ifx\hyxmp at string\@empty
-  \else
-    \hyxmp at xmlify{\hyxmp at string}%
+  \@ifnotmtargexp{#2}{%
+    \hyxmp at xmlify{#2}%
     \hyxmp at add@to at xml{%
-_________<#1>\hyxmp at xmlified</#1>^^J%
+      \hyxmp at extra@indent______<#1>\hyxmp at xmlified</#1>^^J%
     }%
-  \fi
+  }%
 }
 \newcommand*{\hyxmp at add@simple at var}[2]{%
   \expandafter\ifx\csname#2\endcsname\relax
@@ -805,10 +854,33 @@
   \else
     \hyxmp at xmlify{\csname#2\endcsname}%
     \hyxmp at add@to at xml{%
-_________<#1>\hyxmp at xmlified</#1>^^J%
+      \hyxmp at extra@indent______<#1>\hyxmp at xmlified</#1>^^J%
     }%
   \fi
 }
+\newcommand*{\hyxmp at add@simple at lang}[2]{%
+  \@ifnotmtarg{#2}{%
+    \hyxmp at xmlify{#2}%
+    \expandafter\hyxmp at add@simple at lang@i\hyxmp at xmlified\relax{#1}%
+  }%
+}
+\newcommand*{\hyxmp at add@simple at lang@i}{%
+  \@ifnextchar[\hyxmp at add@simple at lang@ii{\hyxmp at add@simple at lang@ii[]}%
+}
+\def\hyxmp at add@simple at lang@ii[#1]#2\relax#3{%
+  \@ifnotmtarg{#2}{%
+    \hyxmp at xmlify{#2}%
+    \@ifmtarg{#1}{%
+      \hyxmp at add@to at xml{%
+______<#3>\hyxmp at xmlified</#3>^^J%
+      }%
+    }{%
+      \hyxmp at add@to at xml{%
+______<#3 xml:lang="#1">\hyxmp at xmlified</#3>^^J%
+      }%
+    }%
+  }%
+}
 \newcommand*{\hyxmp at rdf@dc}[3][\iffalse]{%
   \@ifmtargexp{#3}{\@tempswafalse}{\@tempswatrue}%
   #1
@@ -818,29 +890,29 @@
     \hyxmp at xmlify{#3}%
     \let\hyxmp at value=\hyxmp at xmlified
     \hyxmp at add@to at xml{%
-_________<dc:#2>^^J%
-____________<rdf:Alt>^^J%
+______<dc:#2>^^J%
+________<rdf:Alt>^^J%
     }%
     \ifx\@pdfmetalang\hyxmp at x@default
     \else
       \hyxmp at xmlify{\@pdfmetalang}%
       \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\hyxmp at xmlified">\hyxmp at value</rdf:li>^^J%
+__________<rdf:li xml:lang="\hyxmp at xmlified">\hyxmp at value</rdf:li>^^J%
       }%
     \fi
     \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at value</rdf:li>^^J%
+__________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at value</rdf:li>^^J%
     }%
     \def\do##1##2{
       \hyxmp at xmlify{##2}%
       \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="##1">\hyxmp at xmlified</rdf:li>^^J%
+__________<rdf:li xml:lang="##1">\hyxmp at xmlified</rdf:li>^^J%
       }%
     }%
     \csname hyxmp at alt@#2\endcsname
     \hyxmp at add@to at xml{%
-____________</rdf:Alt>^^J%
-_________</dc:#2>^^J%
+________</rdf:Alt>^^J%
+______</dc:#2>^^J%
     }%
   \fi
 }%
@@ -851,8 +923,8 @@
   \fi
   \if at tempswa
     \hyxmp at add@to at xml{%
-_________<dc:#2>^^J%
-____________<rdf:#3>^^J%
+______<dc:#2>^^J%
+________<rdf:#3>^^J%
     }%
     \bgroup
       \hyxmp at xmlify{#4}%
@@ -859,23 +931,19 @@
       \hyxmp at commas@to at list\hyxmp at list{\hyxmp at xmlified}%
       \def\@elt##1{%
         \hyxmp at add@to at xml{%
-_______________<rdf:li>##1</rdf:li>^^J%
+__________<rdf:li>##1</rdf:li>^^J%
         }%
       }%
       \hyxmp at list
     \egroup
     \hyxmp at add@to at xml{%
-____________</rdf:#3>^^J%
-_________</dc:#2>^^J%
+________</rdf:#3>^^J%
+______</dc:#2>^^J%
     }%
   \fi
 }
 \newcommand*{\hyxmp at dc@schema}{%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:dc="http://purl.org/dc/elements/1.1/">^^J%
-_________<dc:format>application/pdf</dc:format>^^J%
-  }%
+  \hyxmp at add@simple{dc:format}{application/pdf}%
   \hyxmp at rdf@dc[\ifHy at pdfa]{title}{\@pdftitle}%
   \hyxmp at rdf@dc[\ifHy at pdfa]{description}{\@pdfsubject}%
   \hyxmp at rdf@dc{rights}{\@pdfcopyright}%
@@ -888,9 +956,6 @@
   \else
     \hyxmp at add@simple{dc:source}{\@pdfsource}%
   \fi
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
 }
 \newcommand*{\hyxmp at xmpRights@schema}{%
   \let\hyxmp at rights=\@empty
@@ -904,34 +969,19 @@
   \fi
   \ifx\hyxmp at rights\@empty
   \else
-    \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-___________xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">^^J%
-    }%
     \ifx\@pdfcopyright\@empty
     \else
-      \hyxmp at add@to at xml{%
-_________<xmpRights:Marked>True</xmpRights:Marked>^^J%
-      }%
+      \hyxmp at add@simple{xmpRights:Marked}{True}%
     \fi
     \hyxmp at add@simple{xmpRights:WebStatement}{\@pdflicenseurl}%
-    \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-    }%
   \fi
 }
 \gdef\hyxmp at mm@schema{%
   \@ifmtargexp{\hyxmp at DocumentID}{\hyxmp at def@DocumentID}{}%
   \@ifmtargexp{\hyxmp at InstanceID}{\hyxmp at def@InstanceID}{}%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
-  }%
   \hyxmp at add@simple{xmpMM:DocumentID}{\hyxmp at DocumentID}%
   \hyxmp at add@simple{xmpMM:InstanceID}{\hyxmp at InstanceID}%
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
+  \hyxmp at add@simple{xmpMM:VersionID}{\@pdfversionid}%
 }
 \newcommand*{\hyxmp at define@createdate}{%
   \@ifundefined{pdffeedback}{%
@@ -945,10 +995,6 @@
   }%
 }
 \newcommand*{\hyxmp at xmp@basic at schema}{%
-  \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:xmp="http://ns.adobe.com/xap/1.0/">^^J%
-  }%
   \hyxmp at define@createdate
   \@ifundefined{@pdfcreationdate}{%
     \hyxmp at add@simple{xmp:CreateDate}{\hyxmp at createdate}%
@@ -977,26 +1023,16 @@
   \fi
   \hyxmp at add@simple{xmp:CreatorTool}{\@pdfcreator}%
   \hyxmp at add@simple{xmp:BaseURL}{\@baseurl}%
-  \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-  }%
 }
 \gdef\hyxmp at photoshop@schema{%
   \edef\hyxmp at photoshop@data{\@pdfauthortitle\@pdfcaptionwriter}%
-  \ifx\hyxmp at photoshop@data\@empty
-  \else
-    \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">^^J%
-    }%
-  \fi
   \hyxmp at add@simple{photoshop:AuthorsPosition}{\@pdfauthortitle}%
   \hyxmp at add@simple{photoshop:CaptionWriter}{\@pdfcaptionwriter}%
-  \ifx\hyxmp at photoshop@data\@empty
-  \else
-    \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-    }%
+}
+\newcommand*{\hyxmp at pdfa@id at schema}{%
+  \ifHy at pdfa
+    \hyxmp at add@simple{pdfaid:part}{\@pdfapart}%
+    \hyxmp at add@simple{pdfaid:conformance}{\@pdfaconformance}%
   \fi
 }
 \begingroup
@@ -1008,7 +1044,7 @@
   \@ifnotmtargexp{#2}{%
     \bgroup
       \hyxmp at add@to at xml{%
-_________<#1>%
+        \hyxmp at extra@indent______<#1>%
       }%
       \def\@elt at first##1{%
         \hyxmp at add@to at xml{##1}%
@@ -1025,8 +1061,51 @@
     \egroup
   }%
 }
-\gdef\hyxmp at photometa@schema{%
-  \edef\hyxmp at photometa@data{%
+\gdef\hyxmp at iptc@schema{%
+  \ifx\hyxmp at iptc@data\@empty
+  \else
+    \hyxmp at add@to at xml{%
+______<Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">^^J%
+    }%
+    \bgroup
+      \edef\hyxmp at extra@indent{\hyxmp at extra@indent\space\space}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}%
+      \hyxmp at add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}%
+      \def\xmplinesep{,}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}%
+      \hyxmp at list@to at lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}%
+    \egroup
+    \hyxmp at add@to at xml{%
+______</Iptc4xmpCore:CreatorContactInfo>^^J%
+    }%
+  \fi
+}
+\newcommand*{\hyxmp at prism@schema}{%
+  \ifx\hyxmp at prism@data\@empty
+  \else
+    \hyxmp at add@simple{prism:complianceProfile}{three}%
+  \fi
+  \hyxmp at add@simple at lang{prism:subtitle}{\@pdfsubtitle}%
+  \hyxmp at add@simple at lang{prism:publicationName}{\@pdfpublication}%
+  \hyxmp at add@simple{prism:aggregationType}{\@pdfpubtype}%
+  \hyxmp at add@simple at lang{prism:bookEdition}{\@pdfbookedition}%
+  \hyxmp at add@simple{prism:volume}{\@pdfvolumenum}%
+  \hyxmp at add@simple{prism:number}{\@pdfissuenum}%
+  \hyxmp at add@simple{prism:pageRange}{\@pdfpagerange}%
+  \hyxmp at add@simple{prism:isbn}{\@pdfisbn}%
+  \hyxmp at add@simple{prism:issn}{\@pdfissn}%
+  \hyxmp at add@simple{prism:eIssn}{\@pdfeissn}%
+  \hyxmp at add@simple{prism:doi}{\@pdfdoi}%
+  \hyxmp at add@simple{prism:url}{\@pdfurl}%
+  \hyxmp at add@simple{prism:byteCount}{\@pdfbytes}%
+  \hyxmp at add@simple{prism:pageCount}{\@pdfnumpages}%
+}
+\newcommand*{\hyxmp at check@iptc at data}{%
+  \edef\hyxmp at iptc@data{%
     \@pdfcontactaddress
     \@pdfcontactcity
     \@pdfcontactregion
@@ -1036,109 +1115,253 @@
     \@pdfcontactemail
     \@pdfcontacturl
   }%
-  \ifx\hyxmp at photometa@data\@empty
-  \else
-    \hyxmp at iptc@extensions
-    \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-___________xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/">^^J%
-_______<Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">^^J%
-    }%
-  \fi
-  \hyxmp at list@to at lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}%
-  \hyxmp at add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}%
-  \bgroup
-    \def\xmplinesep{,}%
-    \hyxmp at list@to at lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}%
-    \hyxmp at list@to at lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}%
-    \hyxmp at list@to at lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}%
-  \egroup
-  \ifx\hyxmp at photometa@data\@empty
-  \else
-    \hyxmp at add@to at xml{%
-_______</Iptc4xmpCore:CreatorContactInfo>^^J%
-______</rdf:Description>^^J%
-    }%
-  \fi
+}%
+\newcommand*{\hyxmp at check@prism at data}{%
+  \edef\hyxmp at prism@data{%
+    \@pdfbookedition
+    \@pdfbytes
+    \@pdfdoi
+    \@pdfeissn
+    \@pdfisbn
+    \@pdfissn
+    \@pdfissuenum
+    \@pdfnumpages
+    \@pdfpagerange
+    \@pdfpublication
+    \@pdfpubtype
+    \@pdfsubtitle
+    \@pdfurl
+    \@pdfvolumenum
+  }%
+}%
+\newcommand*{\hyxmp at begin@extension at decls}{%
+  \hyxmp at add@to at xml{%
+______<pdfaExtension:schemas>^^J%
+________<rdf:Bag>^^J%
+  }%
 }
-\newcommand*{\hyxmp at iptc@extensions}{%
+\newcommand*{\hyxmp at end@extension at decls}{%
   \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-__________xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"^^J%
-__________xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema\hyxmp@hash"^^J%
-__________xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property\hyxmp@hash"^^J%
-__________xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type\hyxmp@hash"^^J%
-__________xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field\hyxmp@hash">^^J%
-________<pdfaExtension:schemas>^^J%
-__________<rdf:Bag>^^J%
-____________<rdf:li rdf:parseType="Resource">^^J%
-______________<pdfaSchema:schema>IPTC Core Schema</pdfaSchema:schema>^^J%
-______________<pdfaSchema:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaSchema:namespaceURI>^^J%
-______________<pdfaSchema:prefix>Iptc4xmpCore</pdfaSchema:prefix>^^J%
-______________<pdfaSchema:property>^^J%
-________________<rdf:Seq>^^J%
-__________________<rdf:li rdf:parseType="Resource">^^J%
-____________________<pdfaProperty:name>CreatorContactInfo</pdfaProperty:name>^^J%
-____________________<pdfaProperty:valueType>contactinfo</pdfaProperty:valueType>^^J%
-____________________<pdfaProperty:category>external</pdfaProperty:category>^^J%
-____________________<pdfaProperty:description>contact information for the document's creator</pdfaProperty:description>^^J%
-__________________</rdf:li>^^J%
-________________</rdf:Seq>^^J%
-______________</pdfaSchema:property>^^J%
-______________<pdfaSchema:valueType>^^J%
-________________<rdf:Seq>^^J%
-__________________<rdf:li rdf:parseType="Resource">^^J%
-____________________<pdfaType:type>contactinfo</pdfaType:type>^^J%
-____________________<pdfaType:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaType:namespaceURI>^^J%
-____________________<pdfaType:prefix>Iptc4xmpCore</pdfaType:prefix>^^J%
-____________________<pdfaType:description>contact information</pdfaType:description>^^J%
-____________________<pdfaType:field>^^J%
-______________________<rdf:Seq>^^J%
+________</rdf:Bag>^^J%
+______</pdfaExtension:schemas>^^J%
   }%
-  \hyxmp at text@resource{CiAdrExtadr}{contact address}%
-  \hyxmp at text@resource{CiAdrCity}{contact city}%
-  \hyxmp at text@resource{CiAdrRegion}{contact region}%
-  \hyxmp at text@resource{CiAdrPcode}{contact postal code}%
-  \hyxmp at text@resource{CiAdrCtry}{contact country}%
-  \hyxmp at text@resource{CiTelWork}{contact telephone number}%
-  \hyxmp at text@resource{CiEmailWork}{contact email address}%
-  \hyxmp at text@resource{CiUrlWork}{contact url}%
+}
+\newcommand*{\hyxmp at begin@ext at decl}[3]{%
   \hyxmp at add@to at xml{%
-______________________</rdf:Seq>^^J%
-____________________</pdfaType:field>^^J%
-__________________</rdf:li>^^J%
-________________</rdf:Seq>^^J%
-______________</pdfaSchema:valueType>^^J%
-____________</rdf:li>^^J%
-__________</rdf:Bag>^^J%
-________</pdfaExtension:schemas>^^J%
-______</rdf:Description>^^J%
+__________<rdf:li rdf:parseType="Resource">^^J%
+____________<pdfaSchema:schema>#1</pdfaSchema:schema>^^J%
+____________<pdfaSchema:prefix>#2</pdfaSchema:prefix>^^J%
+____________<pdfaSchema:namespaceURI>#3</pdfaSchema:namespaceURI>^^J%
+____________<pdfaSchema:property>^^J%
+______________<rdf:Seq>^^J%
   }%
+}%
+\newcommand*{\hyxmp at end@ext at decl}{%
+  \hyxmp at add@to at xml{%
+______________</rdf:Seq>^^J%
+____________</pdfaSchema:property>^^J%
+__________</rdf:li>^^J%
+  }%
+}%
+\newcommand{\hyxmp at declare@property}[4][Text]{%
+  \hyxmp at add@to at xml{%
+________________<rdf:li rdf:parseType="Resource">^^J%
+__________________<pdfaProperty:name>#2</pdfaProperty:name>^^J%
+__________________<pdfaProperty:valueType>#1</pdfaProperty:valueType>^^J%
+__________________<pdfaProperty:category>#3</pdfaProperty:category>^^J%
+__________________<pdfaProperty:description>#4</pdfaProperty:description>^^J%
+________________</rdf:li>^^J%
+  }%
+}%
+\newcommand{\hyxmp at declare@field}[3][Text]{%
+  \hyxmp at add@to at xml{%
+______________________<rdf:li rdf:parseType="Resource">^^J%
+________________________<pdfaField:name>#2</pdfaField:name>^^J%
+________________________<pdfaField:valueType>#1</pdfaField:valueType>^^J%
+________________________<pdfaField:description>#3</pdfaField:description>^^J%
+______________________</rdf:li>^^J%
+  }%
 }
-\newcommand*{\hyxmp at text@resource}[2]{%
+\newcommand*{\hyxmp at mm@extensions}{%
+  \hyxmp at begin@ext at decl
+      {XMP Media Management Schema}%
+      {xmpMM}%
+      {http://ns.adobe.com/xap/1.0/mm/}%
+  \hyxmp at declare@property
+      [URI]
+      {DocumentID}%
+      {internal}%
+      {UUID based identifier for all versions and renditions of a document}%
+  \hyxmp at declare@property
+      [URI]
+      {InstanceID}%
+      {internal}%
+      {UUID based identifier for specific incarnation of a document}%
+  \hyxmp at declare@property
+      {VersionID}%
+      {internal}%
+      {Document version identifier}%
+  \hyxmp at end@ext at decl
+}%
+\newcommand*{\hyxmp at pdfa@id at extensions}{%
+  \hyxmp at begin@ext at decl
+      {PDF/A Identification Schema}%
+      {pdfaid}%
+      {http://www.aiim.org/pdfa/ns/id/}%
+  \hyxmp at declare@property
+      [Integer]%
+      {part}%
+      {internal}%
+      {Part of PDF/A standard}%
+  \hyxmp at declare@property
+      {conformance}%
+      {internal}%
+      {Conformance level of PDF/A standard}%
+  \hyxmp at end@ext at decl
+}%
+\newcommand*{\hyxmp at iptc@extensions}{%
+  \hyxmp at begin@ext at decl
+      {IPTC Core Schema}%
+      {Iptc4xmpCore}%
+      {http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/}%
+  \hyxmp at declare@property
+      [ContactInfo]
+      {CreatorContactInfo}
+      {external}
+      {Document creator's contact information}
   \hyxmp at add@to at xml{%
-________________________<rdf:li rdf:parseType="Resource">^^J%
-__________________________<pdfaField:name>#1</pdfaField:name>^^J%
-__________________________<pdfaField:valueType>Text</pdfaField:valueType>^^J%
-__________________________<pdfaField:description>#2</pdfaField:description>^^J%
-________________________</rdf:li>^^J%
-  }
+______________</rdf:Seq>^^J%
+____________</pdfaSchema:property>^^J%
+____________<pdfaSchema:valueType>^^J%
+______________<rdf:Seq>^^J%
+________________<rdf:li rdf:parseType="Resource">^^J%
+__________________<pdfaType:type>ContactInfo</pdfaType:type>^^J%
+__________________<pdfaType:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaType:namespaceURI>^^J%
+__________________<pdfaType:prefix>Iptc4xmpCore</pdfaType:prefix>^^J%
+__________________<pdfaType:description>%
+                   Basic set of information to get in contact with a person%
+                 </pdfaType:description>^^J%
+__________________<pdfaType:field>^^J%
+____________________<rdf:Seq>^^J%
+  }%
+  \hyxmp at declare@field
+      {CiAdrCity}%
+      {Contact information city}%
+  \hyxmp at declare@field
+      {CiAdrCtry}%
+      {Contact information country}%
+  \hyxmp at declare@field
+      {CiAdrExtadr}%
+      {Contact information address}%
+  \hyxmp at declare@field
+      {CiAdrPcode}%
+      {Contact information local postal code}%
+  \hyxmp at declare@field
+      {CiAdrRegion}%
+      {Contact information regional information such as state or province}%
+  \hyxmp at declare@field
+      {CiEmailWork}%
+      {Contact information email address(es)}%
+  \hyxmp at declare@field
+      {CiTelWork}%
+      {Contact information telephone number(s)}%
+  \hyxmp at declare@field
+      {CiUrlWork}%
+      {Contact information Web URL(s)}%
+  \hyxmp at add@to at xml{%
+____________________</rdf:Seq>^^J%
+__________________</pdfaType:field>^^J%
+________________</rdf:li>^^J%
+______________</rdf:Seq>^^J%
+____________</pdfaSchema:valueType>^^J%
+__________</rdf:li>^^J%
+  }%
 }
-\newcommand*{\hyxmp at pdfa@id at schema}{%
+\newcommand*{\hyxmp at prism@extensions}{%
+  \hyxmp at begin@ext at decl
+      {PRISM Basic Metadata}%
+      {prism}%
+      {http://prismstandard.org/namespaces/basic/2.1/}%
+  \hyxmp at declare@property
+      {complianceProfile}%
+      {internal}%
+      {PRISM specification compliance profile to which this document adheres}%
+  \hyxmp at declare@property
+      {publicationName}%
+      {external}%
+      {Publication name}%
+  \hyxmp at declare@property
+      {aggregationType}%
+      {external}%
+      {Publication type}%
+  \hyxmp at declare@property
+      {bookEdition}%
+      {external}%
+      {Edition of the book in which the document was published}%
+  \hyxmp at declare@property
+      {volume}%
+      {external}%
+      {Publication volume number}%
+  \hyxmp at declare@property
+      {number}%
+      {external}%
+      {Publication issue number within a volume}%
+  \hyxmp at declare@property
+      {pageRange}%
+      {external}%
+      {Page range for the document within the print version of its publication}%
+  \hyxmp at declare@property
+      {issn}%
+      {external}%
+      {ISSN for the printed publication in which the document was published}%
+  \hyxmp at declare@property
+      {eIssn}%
+      {external}%
+      {ISSN for the electronic publication in which the document was published}%
+  \hyxmp at declare@property
+      {isbn}%
+      {external}%
+      {ISBN for the publication in which the document was published}%
+  \hyxmp at declare@property
+      {doi}%
+      {external}%
+      {Digital Object Identifier for the document}%
+  \hyxmp at declare@property
+      [URL]
+      {url}%
+      {external}%
+      {URL at which the document can be found}%
+  \hyxmp at declare@property
+      [Integer]
+      {byteCount}%
+      {internal}%
+      {Approximate file size in octets}%
+  \hyxmp at declare@property
+      [Integer]
+      {pageCount}%
+      {internal}%
+      {Number of pages in the print version of the document}%
+  \hyxmp at declare@property
+      {subtitle}%
+      {external}%
+      {Document's subtitle}%
+  \hyxmp at end@ext at decl
+}%
+\newcommand*{\hyxmp at declare@extensions}{%
+  \hyxmp at begin@extension at decls
+  \hyxmp at mm@extensions
   \ifHy at pdfa
-    \hyxmp at add@to at xml{%
-______<rdf:Description rdf:about=""^^J%
-____________xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">^^J%
-    }%
-    \hyxmp at add@simple{pdfaid:part}{\@pdfapart}%
-    \hyxmp at add@simple{pdfaid:conformance}{\@pdfaconformance}%
-    \hyxmp at add@to at xml{%
-______</rdf:Description>^^J%
-    }%
+    \hyxmp at mm@extensions
   \fi
+  \ifx\hyxmp at iptc@data\@empty
+  \else
+    \hyxmp at iptc@extensions
+  \fi
+  \ifx\hyxmp at prism@data\@empty
+  \else
+    \hyxmp at prism@extensions
+  \fi
+  \hyxmp at end@extension at decls
 }
 \begingroup
   \ifhyxmp at unicodetex
@@ -1157,20 +1380,41 @@
   \gdef\hyxmp at xml{}%
   \hyxmp at add@to at xml{<?xpacket begin="\hyxmp at bom" %
 id="W5M0MpCehiHzreSzNTczkc9d"?>^^J%
-<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-702">^^J%
-___<rdf:RDF
+<x:xmpmeta xmlns:x="adobe:ns:meta/">^^J%
+__<rdf:RDF %
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns\hyxmp@hash">^^J%
+____<rdf:Description rdf:about=""^^J%
+_____________________xmlns:pdf="http://ns.adobe.com/pdf/1.3/"^^J%
+_____________________xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"^^J%
+_____________________xmlns:dc="http://purl.org/dc/elements/1.1/"^^J%
+_____________________xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"^^J%
+_____________________xmlns:xmp="http://ns.adobe.com/xap/1.0/"^^J%
+_____________________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"^^J%
+_____________________xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent\hyxmp@hash"^^J%
+_____________________xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"^^J%
+_____________________xmlns:prism="http://prismstandard.org/namespaces/basic/2.1/"^^J%
+_____________________xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"^^J%
+_____________________xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"^^J%
+_____________________xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema\hyxmp@hash"^^J%
+_____________________xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property\hyxmp@hash"^^J%
+_____________________xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type\hyxmp@hash"^^J%
+_____________________xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field\hyxmp@hash">^^J%
   }%
+  \hyxmp at check@iptc at data
+  \hyxmp at check@prism at data
+  \hyxmp at declare@extensions
   \hyxmp at pdf@schema
   \hyxmp at xmpRights@schema
   \hyxmp at dc@schema
   \hyxmp at photoshop@schema
-  \hyxmp at photometa@schema
   \hyxmp at xmp@basic at schema
   \hyxmp at pdfa@id at schema
   \hyxmp at mm@schema
+  \hyxmp at iptc@schema
+  \hyxmp at prism@schema
   \hyxmp at add@to at xml{%
-___</rdf:RDF>^^J%
+____</rdf:Description>^^J%
+__</rdf:RDF>^^J%
 </x:xmpmeta>^^J%
 \hyxmp at padding
 <?xpacket end="w"?>^^J%



More information about the tex-live-commits mailing list