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: problem with including external files


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


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