[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: problem with including external files

Subject: Re: problem with including external files
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 12 Sep 2002 13:25:21 +0100
including external files in xsl
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.