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

RE: document() revisited

Subject: RE: document() revisited
From: "Beckers, Marc" <Marc.Beckers@xxxxxxxxxxxxxx>
Date: Thu, 17 Feb 2000 11:31:43 +0100
RE: document() revisited
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

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.