This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: IMPORTING XML DOCS INTO AN XSLT
- From: "Bryan Rasmussen" <bry at itnisk dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 14 Mar 2002 13:56:35 +0100
- Subject: RE: [xsl] IMPORTING XML DOCS INTO AN XSLT
- Keywords: xsltDEV
- Reply-to: xsl-list at lists dot mulberrytech dot com
>I was wondering if it is possible to import XML documents directly into an
>XSLT stylesheet.
>For example, I would like to call a template for my current XML document,
>and have the XSLT document import a few standard XML files with
>configuration info and have the data from the XSLT process the imported XML
>as well.
>The master plan behind this? I have a web page XML, it calls a stylesheet
to
>format it into HTML. But I dont want to pass the navigation menu with the
>page document each time, I would like the XSLT to automatically pick it up
>and processes it.
use the document function
<xsl:param name="doc" select="document('menu.xml')"/>
<xsl:template match="/">
<html><head></head><body><xsl:for-each
select="$doc"><xsl:apply-templates/></xsl:for-each></body></html>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list