On 29 Apr 2002, Chris Wenham wrote:

>  I think the only way is to use something like:
> 
>  <xsl:apply-templatess
> select="document('http://www.yourserver.com/foo.xsp')/root"/>
> 
>  There aren't any XSLT processors that understand XSP, not even the one
> that comes with AxKit, and XML namespaces aren't really meant to invoke
> arbitrary processors in a single stage of the pipeline. They're for
> either separating dialects, or preventing tags from being interpreted by
> the wrong processor.

This can be done with AxKit, but it will require some changes to AxKit
itself. There's no need to adjust the XSL processor, since they already
support callbacks to retrieve remote resources.

Although the original poster wouldn't use XML namespaces to separate out
the content from the document() call (at least I wouldn't, because I find
them confusing and untrustworthy), he might want to use the 'mode' XSL
attribute. An example:

 ...
    <xsl:apply-templates select="document('_menu.xml')" mode="menu"/>
 ...

 <xsl:template match="menuresponse" mode="menu">
   <div class="menu">
     <xsl:apply-templates select="menus/menu/category" mode="menu"/>
   </div>
 </xsl:template>

 <xsl:template match="menus/menu/category" mode="menu">
   <div id="menuhead">
     <xsl:value-of select="category_name"/>
   </div>
   <xsl:apply-templates select="items/menu" mode="menu"/>
 </xsl:template>


This is adapted from an actual working example (I'm not actually using the
mode attribute in this case, although I should be).


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

Reply via email to