Skip to content

Add XML declaration to FM import files (staging/return) #24

@pdaengeli

Description

@pdaengeli

In the course of the pipeline run, import files are created for each category (library/pwl-library.xpl#L90-L113, library/return/1-addPWLid.xsl).

Currently, these files are serialised to disk without any XML declaration. I think it would be sensible to add <?xml version="1.0" encoding="UTF-8" ?> (not sure FileMaker requires this, but it is good to make UTF-8 explicit).

It should be enough to change library/pwl-library.xpl#L109-L111:

            <p:store>
                <p:with-option name="href" select="p:base-uri()"/>
+               <p:with-option name="omit-xml-declaration" select="'false'"/>
            </p:store>

If this doesn't have the desired effect, adding serialisation attributes to xsl:result-document in library/return/1-addPWLid.xsl#L26 might help:

-            <xsl:result-document href="{concat(base-uri() => substring-before('input'),'return/',tokenize(base-uri(),'/')[last()])}">
+            <xsl:result-document method="xml" encoding="UTF-8" href="{concat(base-uri() => substring-before('input'),'return/',tokenize(base-uri(),'/')[last()])}">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions