Subject: [xsl] Fwd: BOUNCE xsl-list@lists.mulberrytech.com: Non-member submission from ["Jeni Tennison" <jeni@tennison.2ndmail.com>] From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 09 May 2001 22:31:47 +0100 |
Date: Tue, 8 May 2001 04:38:42 -0400 (EDT)
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list-approval@xxxxxxxxxxxxxxxxxxxxxx
Subject: BOUNCE xsl-list@xxxxxxxxxxxxxxxxxxxxxx: Non-member submission from ["Jeni Tennison" <jeni@xxxxxxxxxxxxxxxxxxxx>]
X-Loop-Detect: 1
>From jeni@xxxxxxxxxxxxxxxxxxxx Tue May 8 04:38:32 2001
Received: from www.2ndmail.com (2ndmail.com [209.75.7.64])
by biglist.com (8.8.8/8.8.5/BL-2) with SMTP id EAA12458
for <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>; Tue, 8 May 2001 04:38:32 -0400 (EDT)
Date: Tue, 8 May 2001 04:38:32 -0400 (EDT)
Message-Id: <200105080838.EAA12458@xxxxxxxxxxx>
Received: (qmail 71888 invoked from network); 8 May 2001 08:39:49 -0000
Received: from localhost (HELO 2ndmail.com) (127.0.0.1)
by localhost with SMTP; 8 May 2001 08:39:49 -0000
From: "Jeni Tennison" <jeni@xxxxxxxxxxxxxxxxxxxx>
To: "Kevin Gragg" <kgragg@xxxxxxxxxx>
Cc: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Importance: Normal
X-Mailer: VisualMail 3.05 ( http://www.mintersoft.com/visualmail )
Subject: Re: [xsl] XSL tree explanation
Mime-Version: 1.0
Content-type: text/plain; charset="iso-8859-1"
Hi Kevin,
> What I don't understand is how the stylesheet itself is considered > the instruction tree(?) besides the fact that through numerous > declarations and instructions does a well formed, and I guess you > would say TREE structured document call itself an XSL file.
I'm not sure what you mean by 'instruction tree' here - I haven't seen that term used before.
When the processor reads in the stylesheet, it constructs a tree from it in just the same way as it does with a source XML document. The big difference is in how whitespace is treated. You can control how whitespace-only text nodes are treated in the source XML (using xsl:strip-space and xsl:preserve-space) but you can't control it in the stylesheet. When the stylesheet is parsed, all the whitespace-only text nodes aside from those in xsl:text are stripped.
(Note that this whitespace-only text node stripping is about the way the file is used, not about the file itself. If you access the stylesheet using document('') then the tree will be built just like any source node tree.)
> Also, I believe the xslt processor stores the source document in > memory until the transformation takes place, but what about the > RESULT tree? Is that the output file(ie the resulting HTML file) or > is there an actual RESULT tree outputted/stored during the > transformation?
When the source tree is processed by the stylesheet, the stylesheet produces a result tree. Theoretically, this result tree could be held in memory, could be passed on as the source node tree to be used by the next step in the transformation or whatever. The result tree is only serialised as the last step of the process, with xsl:output controlling the details about how it's serialised.
It's *really* useful to think about constructing the result tree and then serialising it rather than thinking about outputting to a file because it stops you from falling into thinking procedurally about what's going on. You are not outputting tags, you are generating elements that may later be output.
> The last one is probably why I'm missing the thinking behind > <xsl:copy> and node-sets.
xsl:copy and xsl:copy-of copy a node (shallowly or deeply) from the source node tree to the result node tree. Node sets are just collections of (pointers to) nodes from the source node tree, that you might apply templates to or iterate over or copy or whatever.
I hope that helps clear some of this up for you. Do ask further questions if you need to.
Cheers,
Jeni
(this is a temporary address due to mailing problems - please use mail@xxxxxxxxxxxxxxxx)
Jeni Tennison http://www.jenitennison.com
======================================================
The most personalized email addresses available! at: http://www.2ndmail.com Say goodbye to that boring email address.
======================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Fwd: BOUNCE xsl-list@lists.mu, Wendell Piez | Thread | [xsl] Fwd: BOUNCE xsl-list@lists.mu, Wendell Piez |
[xsl] Fwd: BOUNCE xsl-list@lists.mu, Wendell Piez | Date | [xsl] Fwd: BOUNCE xsl-list@lists.mu, Wendell Piez |
Month |