Page 1 of 1

fo:declarations and x:xmpmeta: element not allowed here

Posted: Tue Jan 28, 2020 11:31 am
by burnersk
When I define PDF meta tags for my XSL-FO transformation, I always receive the following error of the following code snippet.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <!-- ... -->
    <fo:declarations>
        <x:xmpmeta xmlns:x="adobe:ns:meta/">
            <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
                    <dc:title>Title</dc:title>
                    <dc:creator>Author</dc:creator>
                    <dc:description>Subject</dc:description>
                </rdf:Description>
                <rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
                    <pdf:Keywords>Keywords</pdf:Keywords>
                </rdf:Description>
                <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
                    <xmp:CreatorTool>Creator</xmp:CreatorTool>
                </rdf:Description>
            </rdf:RDF>
        </x:xmpmeta>
    </fo:declarations>
    <!-- ... -->
</fo:root>
element "x:xmpmeta" not allowed here; expected the element end-tag or element "custom-property", "document-info" or "hyphenation-info" (with xmlns="http://www.antennahouse.com/names/XSL/Extensions")
I could not really find something useful in regard to custom-property or the others.

Can someone help me make my XSL-FO follow strict standards?

Re: fo:declarations and x:xmpmeta: element not allowed here

Posted: Wed Jan 29, 2020 9:38 am
by Radu
Hi,

Your XSL-FO validation follows the XSL-FO specification and correctly reports the "x:xmpmeta" element as not being part of the standard.
But indeed the Apache FOP PDF processor recognizes various non standard extensions, among which this "x:xmpmeta" element.
Oxygen uses for validation the schemas from the "focheck" open source project:

https://github.com/AntennaHouse/focheck

These schemas recognize Antenna House extensions to the XSL-FO schema but not Apache FOP extensions.
So besides manually making changes to the schemas used by Oxygen for validation (OXYGEN_INSTALL_DIR\frameworks\focheck\schema\rng\axf-mathml3-svg11.rng) I'm not sure what could be done.

Regards,
Radu