Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pdaengeli opened this issue Feb 1, 2024 · 0 comments
Open

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

pdaengeli opened this issue Feb 1, 2024 · 0 comments

Comments

@pdaengeli
Copy link
Member

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()])}">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant