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

Here should go questions about transforming XML with XSLT and FOP.
Posts: 1
Joined: Tue Jan 28, 2020 11:24 am

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

Post by burnersk » Tue Jan 28, 2020 11:31 am

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="">
    <!-- ... -->
        <x:xmpmeta xmlns:x="adobe:ns:meta/">
            <rdf:RDF xmlns:rdf="">
                <rdf:Description xmlns:dc="" rdf:about="">
                <rdf:Description xmlns:pdf="" rdf:about="">
                <rdf:Description xmlns:xmp="" rdf:about="">
    <!-- ... -->
element "x:xmpmeta" not allowed here; expected the element end-tag or element "custom-property", "document-info" or "hyphenation-info" (with xmlns="")
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?

Posts: 6922
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Wed Jan 29, 2020 9:38 am


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:

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.

Radu Coravu
<oXygen/> XML Editor

Post Reply