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

xpath parser in strange state #519

Closed pgundlach closed 8 months ago

pgundlach commented 9 months ago
<Layout xmlns="urn:speedata.de:2009/publisher/en"
    xmlns:sd="urn:speedata:2009/publisher/functions/en">
    <SetVariable variable="foo" select="'foo'"></SetVariable>
    <Pagetype name="p" test="true()">
        <PositioningArea name="area">
            <PositioningFrame width="10" height="10" row="1" column="1" />
        </PositioningArea>
        <AtPageCreation>
            <PlaceObject>
                <Textblock>
                    <Paragraph>
                        <Value select="$foo" />
                    </Paragraph>
                </Textblock>
            </PlaceObject>
        </AtPageCreation>
    </Pagetype>
    <Record element="data">
        <Message select="concat('current-row: ', sd:current-row('area') , '/', sd:number-of-rows('area'))" />
        <PlaceObject>
            <Textblock>
                <Paragraph>
                    <Value></Value>
                </Paragraph>
            </Textblock>
        </PlaceObject>
    </Record>
</Layout>

Output:

Message: "current-row: 1"

expected:

Message: "current-row: 1/10"

This is from #517

pgundlach commented 8 months ago

Fixed with 5f6a5aadd85ea64ca65b2773f731511a17aef5b3