You should use the document node structure :
in source XSLT :
<xsl:variable name="contextSparc"><contextSparc>
        <what>
            blablabla - and yes, I'm French, so not foe bar foe bar...
        </what>
    </contextSparc></xsl:variable>
...
<xsl:copy-of select="saxon:transform(..., $contextNode, $contextSparc)" />


in the external xslt :
<xsl:param name="contextSparc"/>

    ....<xsl:copy-of select="$contextSparc/what"/>


... but I do not have tested it yet !
Christophe

Le 24/01/2013 14:58, Philippe.Favrais@continental-corporation.com a écrit :
Thank you Christophe,
Yes, it didn't work because the node of $contextSparc was not named as the value of the parameter.

Now it works but i have an additional question, how should i do so that in the parameter contextSparc i get the nodeset and not the atomic value.
In fact, I would like to be able to do someting like <xsl:copy-of select="$contextSparc/what"/>

Thank you
Philippe





De :        Christophe Marchand <cmarchand@oxiane.com>
A :        saxon-help@lists.sourceforge.net
Date :        24/01/2013 12:10
Objet :        Re: [saxon] Run and XSL from an XSL and passing a param to the        stylesheet




Reading the doc, your $contextSparc should be :
An element node
   <contextSparc>whatever you want</contextSparc>
or an attribute node
   @contextSparc="whatever-you-want"
or a document node
   <contextSparc>
       <what /> <ever /> <you /> <want />
   </contextSparc>

Do you have something like this ?

Christophe

Le 24/01/2013 10:19,
Philippe.Favrais@continental-corporation.com a écrit :
Hello,

I fail in passing a parameter to a stylesheet which i run from another stylsheet


In the main styleseet, i run the following command :


<
xsl:copy-of select="saxon:transform( saxon:compile-stylesheet( document($xslFile ) ), $contextNode, $contextSparc)"/>


In the executed stylesheet, my parameter
$contextSparc is empty while it should contain something.
<?xml version="1.0" encoding="UTF-8"?>

<
xsl:stylesheet version="2.0"
....        

       
<xsl:import href="Nvm-Base.xsl"/>
       
<xsl:param name="contextSparc"/>
       
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

       
<xsl:template match="*:MODULE-DEF">        
               
<xsl:copy-of select="$contextSparc"/>



Do you know what could be the problem. Is my syntax of
saxon:transform not correct?
Any other idea?


Thank you

Philippe


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d


_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help