This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: problem with including external files
- From: David Carlisle <davidc at nag dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 12 Sep 2002 13:25:21 +0100
- Subject: Re: [xsl] problem with including external files
- References: <F98oPKbP2qhcxEUj0AW0000e05e@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Firstly you don't need to use a node set for this.
You have gone
<xsl:variable name="univ-elements">
<xsl:copy-of select=...
</xsl:variable>
that is a rather expensive operation, copying all the nodes and makes a
result tree fragment that then you have to coerce back to being a node
set with
<xsl:for-each select="xalan:nodeset($univ-elements)
You could instead have gone
<xsl:variable name="univ-elements" select=... />
<xsl:for-each select="$univ-elements">...
I'm not sure what exacly you are tryying to select but
document(//univ-xml[1])/university-records/@*"/>
document(//univ-xml[1]) (using // is inefficient by the way)
should load up univ1.xml
but then
/university-records/@*
will select all the attributes of the university-records element but in
your example at least there are no attributes on this eleemnt so this is
empty.
Perhaps you just want something like
<xsl:template match="univ-xml-list">
<xsl:for-each select="univ-xml">
<xsl:eleenmt name="{.}"/>
<xsl:copy-of select="document(.)"/>
</xsl:element>
</xsl:for-each>
</xsl:template>
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list