This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: IMPORTING XML DOCS INTO AN XSLT



>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]