Hi again,

trying to implement my workaround I realized that my problem was no matter of saxon:transform but of the doc() function loading the xsl file: The xml file being transformed by the original transformation had an xsd assigned. Thus, the loaded xsl file was validated against this xsd as well.

Another problem was that the urls included from the dynamically loaded xsl were not resolved properly against the correct base-uri...

Now I could resolve all of it by replacing

        <xsl:variable name="Result" as="document-node()" select="saxon:transform(saxon:compile-stylesheet(doc($ScriptUrl)), $Input)"/>

by

        <xsl:variable name="Script">
                <xsl:document>
                        <xsl:element name="transform" namespace="http://www.w3.org/1999/XSL/Transform">
                                <xsl:attribute name="version" select="'2.0'"/>
                                <xsl:element name="include" namespace="http://www.w3.org/1999/XSL/Transform">
                                        <xsl:attribute name="href" select="$ScriptUrl"/>
                                </xsl:element>
                        </xsl:element>
                </xsl:document>
        </xsl:variable>
        <xsl:variable name="Result" as="document-node()" select="saxon:transform(saxon:compile-stylesheet($Script), $Input)"/>

Sorry for the confusion...

Patrik

GDV Dienstleistungs-GmbH & Co. KG
Glockengießerwall 1
D-20095 Hamburg
www.gdv-dl.de

Sitz und Registergericht: Hamburg
HRA 93 894
USt.-IdNr : DE 205183123

Komplementärin:
GDV Beteiligungsgesellschaft mbH
Sitz und Registergericht: Hamburg
HRB 71 153

Geschäftsführer:
Volker Sonnenburg
Heiko Beermann

------------------------------------------------------------------
Diese E-Mail und alle Anhänge enthalten vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail and any attached files may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distributionof the material in this e-mail is strictly forbidden.