In your site XSLT insert a document() call, such as
<xsl:copy-of select="document('axkit:/components/menu.xml')"/>use PIs or .htaccess directives to assign whatever XSLT to /components/menu.xml you want... they will be applied and the result will be inserted into your site XSLT's output at that point. Or if you want to do further processing, you can use <xsl:apply-templates select="document(...)"/> and so on. It's very flexible.
A more advanced trick, you can define the components to include in the XML input to the site XSLT by doing something like this:
<xsl:if test="localmenu">
<hr />
<xsl:copy-of select="document(concat('axkit:',string(localmenu)))"/>
</xsl:if>
That' says, if there's a localmenu node (e.g., <localmenu>/components/foo/localmenu.xml</localmenu>) child in the context node, then it constructs an appropriate axkit URI (in this example, it would be axkit:/components/foo/localmenu.xml ). and then copy the (processed by axkit) result into the output.
I like XSLT :-)
HTH,
simon
On Wednesday, February 26, 2003, at 11:04 AM, Tom Howe wrote:
Essentially we have a component driven site. Each part of a page is
described by a separate XML file plus there are XML files that relate to
the url that is being accessed, we call these the primary page.
eg we have xml files for primary pages: /home/index.xml, /home/signin.xml etc
and we have xml files for components: /components/menu.xml, /components/header.xml etc
Any primary page xml or component xml file can "require" (by means of
<include/> tags that another component is loaded. The various component
xml files are then combined to form one long XML file that is first
processed by XSP and then by XPathScript.
-- www.simonwoodside.com -- 99% Devil, 1% Angel
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
