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

same error again (#537) #538

Closed pr-apes closed 8 months ago

pr-apes commented 8 months ago

@pgundlach,

I have exactly the same error with the new release (than the one reported in #537).

Layout:

<Layout
  xmlns="urn:speedata.de:2009/publisher/en"
  xmlns:sd="urn:speedata:2009/publisher/functions/en">

  <PDFOptions duplex="{if (contains($fname, 'whatever')) then 'duplexfliplongedge' else 'duplexflipshortedge'}"/>
  <Record element="data">
    <PlaceObject>
      <Textblock>
        <Paragraph>
          <Value select="."/>
        </Paragraph>
      </Textblock>
    </PlaceObject>
  </Record>
</Layout>

Invocation:

sp --dummy --no-local -v fname=whatever

Contents of publisher.status:

<Status>
  <Errors>1</Errors>
  <Error code='1'>[page 1] Variable &quot;fname&quot; undefined</Error>
  <DurationSeconds>1</DurationSeconds>
</Status>

The weird thing is that your are not getting this error, are you?

Many thanks for your help.

pgundlach commented 8 months ago

I've only tested the new XPath parser, not the old one. I will publish a fix.

pr-apes commented 7 months ago

Many thanks for the fix, @pgundlach.