[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 2002-03-16 17:23 +0100, Robert Sösemann wrote:
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 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?
What do you mean by "display"?
..................... Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] easy treewalker template
Subject: Re: [xsl] easy treewalker template From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 16 Mar 2002 11:53:24 -0500 |
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@xxxxxxxxxxxxxxxxxxxx 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] easy treewalker template, Robert Sösemann | Thread | Re: [xsl] easy treewalker template, Robert Sösemann |
FW: [xsl] How to Disable Right Clic, Anupam Agarwal | Date | Re: [xsl] easy treewalker template, David Carlisle |
Month |