speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
292 stars 36 forks source link

`<AttachFile>` without `description` breaks compilation #447

Closed pr-apes closed 1 year ago

pr-apes commented 1 year ago

@pgundlach,

compiling the following layout with sp --dummy (PDF sample from https://raw.githubusercontent.com/speedata/boxesandglue-examples/main/simpletable/result.pdf):

<Layout xmlns="urn:speedata.de:2009/publisher/en"
    xmlns:sd="urn:speedata:2009/publisher/functions/en">
  <PDFOptions displaymode="attachments"/>
  <AttachFile filename="result.pdf" description="whatever" type="application/pdf"/>

  <Record element="data">
    <PlaceObject>
      <Textblock>
        <Paragraph>
          <Value select="sd:sha512(doc('result.pdf'))"/>
        </Paragraph>
      </Textblock>
    </PlaceObject>
  </Record>
</Layout>

Gives fine results, unless description attribute name is replaced with name.

I'm afraid that now <AttachFile> requires description attribute value to be set.

As far as I know, this may be a bug.

Many thanks for your help.

pr-apes commented 1 year ago

Many thanks for the fix.