AW: [xsl] unsuspected output

Subject: AW: [xsl] unsuspected output
From: Nikolas.Nehmer@xxxxxxxxxxx (Nikolas Nehmer)
Date: Mon, 1 Mar 2004 15:12:52 +0100

|-----Ursprüngliche Nachricht-----
|Von: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-
|list@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von G. Ken Holman
|Gesendet: Montag, 1. März 2004 14:57
|An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
|Betreff: Re: [xsl] unsuspected output
|
|At 2004-03-01 14:31 +0100, Nikolas Nehmer wrote:
|><xsl:apply-templates select="document($file)/*" mode="minimal_list">
|>         <xsl:with-param name="file" select="$file"/>
|></xsl:apply-templates>
|>...
|>This XSL should not produce any output except the Heading because the
|>template which is applied by the apply-templates element is not
present
|>(not included jet). But it produces output, namely the content of
|>document($file)/* (the select statement in apply-templates). Why?
|
|I'm guessing the built-in template rules are giving you your grief.  If
you
|do not supply a template rule for a node that is pushed at your
stylesheet,
|then the built-in template rules are engaged and their behaviour is to
|continue processing the tree in a hiearchical fashion.
|
|>Any suggestions?
|
|Instead of pushing the document element of your remote file, only push
the
|node in the remote file that you want processed.
|


The problem is that the node comes from a list of hrefs to unknown xml
files. So I have to push the root element of that file which I do by
select="document($file)/*" ! I just want to suppress the given behavior
for the case that an element will not match my template rules (so there
should not be displayed anything).



|I hope this helps.
|
|......................... Ken
|
|--
|US XSL training: Washington,DC March 15; San Francisco,CA March 22
|World-wide on-site corporate, government & user group XML training
|G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
|Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
|Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
|Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc
|
|
| XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread