| Subject: RE: document() revisited From: "Beckers, Marc" <Marc.Beckers@xxxxxxxxxxxxxx> Date: Thu, 17 Feb 2000 11:31:43 +0100 | 
Thanks for all your help on this one
and sorry to bother you once more.
I found this construct works for the
copying (overwriting) using the XT extension:
<xsl:template match="file">
    <xsl:variable name="path" select="."/>
    <xsl:variable name="contents" select="document($path)"/>
    <xsl:variable name="newcontents">
 <!-- write new contents -->     
    </xsl:variable>
    <xt:document method="html" href="{$path}">
      <xsl:copy-of select="$newcontents"/>
    </xt:document>     
  </xsl:template> 
It's the "write new contents" that's bugging me now:
I wish to go through each file and copy those nodes to the
result tree that EITHER have no "lang" attribute set,
or that DO NOT have lang="german" or lang="french".
It seems that I can copy either everything or nothing,
since only the HTML root seems to be selected by any expression 
I try (is this the "lazy evaluation" you speak of, Steve?). 
My filter is:
<xsl:copy-of select="selection*[not(boolean(@lang)) or ( @lang !='german'
and @lang !='french' )]"/>
How can I apply this filter to all nodes ("selection") in the files and
filter "true" nodes through to the output files? Remember my
input document was something like:
<mother>
  <file>files\overview.htm</file>
  <file>files\book1\page1.htm</file>
  <file>files\book1\chap1\page2.htm</file>
</mother>
Thanks and cheers,
Marc
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: document() revisited, Daneker, Vincent | Thread | Re: document() revisited, David Carlisle | 
| xsl:number and XT, Christopher R. Maden | Date | RE: including an jpg-file, Ben Robb | 
| Month |