speedata / xts

XML typesetting system
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

xts not able to ignore code after complete layout #11

Closed pr-apes closed 1 year ago

pr-apes commented 1 year ago

@pgundlach,

I have the following layout:

<Layout xmlns="urn:speedata.de/2021/xts/en"
    xmlns:sd="urn:speedata.de/2021/xtsfunctions/en">

    <Record element="data">
        <PlaceObject>
            <Textblock>
                <Paragraph>
                    <Value select="concat('Hello, ', @name, '!')" />
                </Paragraph>
            </Textblock>
        </PlaceObject>
    </Record>
</Layout>

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

I guess that xts should ignore what comes after closing the layout element.

Could you check this? Many thanks for your help.

pgundlach commented 1 year ago

This is invalid xml.

... and xts uses the default strict XML parser from Go, so there is no way to ignore the rest...

pr-apes commented 1 year ago

This makes things harder to write minimal tests using the same source file.

But as you say, this is invalid XML.