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: easy treewalker template


>What do you mean by "display"?

By "display" I mean although in the result doc there are the three node with
EXACTLY those ids it only copies one of them to the output document? Why
that? Its allways like that, so I guess its not the problem that the ids
changed from one run to the next.

----- Original Message -----
From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Saturday, March 16, 2002 5:53 PM
Subject: Re: [xsl] easy treewalker template


At 2002-03-16 17:23 +0100, Robert Sösemann wrote:
>All I want is an template that guarantees to visit each node in my XML doc
>tree.

The built-in template rule matching each element and processing all
children should be sufficient for you.  What isn't happening that you are
expecting to happen?

We have a free resource in our resource library (linked from our home page
below) called "SHOWTREE" that reports on every node of an
instance.  Perhaps that stylesheet will help you.

>When an node with a certain generate-id(.) I want it to be copied to the
>result tree with <xsl:copy>.

When using XSLT, this is not a good strategy.  A principle of using
generate-id() is that it must be used blindly ... you can rely on the value
returned by generate-id() to be the same for a given node each time during
one execution of a stylesheet, but you can never rely on the value being
the same when you run the stylesheet again.

Processors can choose any strategy they wish to formulate a generated
identifier, provided the end result is lexically a name, but the strategy
is not required to produce the same value each time for a node even if the
XML document is unchanged.

Can you base your test on some unique aspect of the node in the instance
that is authored in the information?

>Why does that only display one node and then stop?

What do you mean by "display"?

..................... Ken


--
Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO: June 17-21, 2002
-       : 3-days XML Information Modeling: July 31-August 2, 2002

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                        Definitive XSLT & XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1               Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:   2002-04-08,09,10,11,05-06,07,09,10,13,20,
-                                06-04,07,10,11,13,14,17,20,07-31


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



 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]