On Thu, May 29, 2003 at 11:50:05AM -0400, [EMAIL PROTECTED] wrote:
> Hello.
> 
> I would like to be able to process the output of a single XSP page
> through any one of many different XPathScripts, depending upon runtime
> logic.
> 
> Is this possible?
> How do I accomplish this?


the xsl function document() does that

it all depends on where you get the variable from.  But something like
this could 

  <xsl:template match="something">
    <xsl:apply-templates select="document(@href)" />
  </xsl:template>

or 

   <xsl:copy-of select="document(@href)"/>      

depending on circumstances.  These assume that there is an element
like :

        <something href="subdir/whatever.xsl"/>

in the xml somewhere.  But you can derive the argument to document()
whatever way best suits your purpose

if you want to process the result of the insertion you'll need to add
an xsp step to the processing stack at the top

  ...
  <?xml-stylesheet href="nst.xsl" type="text/xsl"?> - include step
  <?xml-stylesheet href="NULL"    type="application/x-xsp"?> - process result step
  ...

the namespaces in the inclusion need to be handled with care since
they are easily confused or lost.

> 
> Thanks in advance,
> -Paul / TT
> 



-- 
John Edstrom  


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to