xsl-list
[Top] [All Lists]

RE: concatenating 1-n XML files

2002-11-12 07:55:58
1. Can I use the document() function with wildcards in the 
doc-name ? something like: <xsl:for-each 
select="document('name*.xml')"> ? 

Your best bet is to write a shell-script that creates an XML file
index.xml of the form
<index>
<d>name001.xml</d>
<d>name002.xml</d>
etc
</index>

and then your transformation is simply:

<xsl:template match="/">
  <big-doc>
  <xsl:copy-of select="document(/index/d)"/>
  </big-doc>
</xsl:template>

2. If 1. works would  a large number of files (000's) have an 
adverse effect on performance ? Or once a document is 
processed is it retained in memory or released ? Is there an 
upper limit of elements that can be processed ? I'll be using xalan.

You will need a lot of memory. Doing it with SAX would be much more
efficient.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>