Re: [xsl] formatting xml output: inserting newlines between generated attributes

Subject: Re: [xsl] formatting xml output: inserting newlines between generated attributes
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 11 Sep 2003 11:31:07 -0400
Abie,

At 08:34 PM 9/10/2003, you wrote:
In the case of node-set(), however, it is just about the commonest extension function out there (most processors have a version of it), so (given you have to mind your namespace bindings and all that) it's still quite portable. Also, its functionality will be built into XSLT/XPath 2.0, which also mitigates the problem of application-dependency over the longer term (not that there won't be adjustments to make).

ok. so I'll be able to build a tree in 2.0 also. but you had said that it would be transparent. do you feel that vendors of 2.0 will still support node-set() usage? (I guess we can ask michael kay about saxon, at least).

This is only one of a number of adjustments you will have to make to convert a 1.0 stylesheet into a 2.0 stylesheet. C'est la vie: it's the price of progress. (If it's not actually progress to you, stick with 1.0.)


also, leaving aside compatibility issues, what do you think about constructing a tree within one xslt vs. having a 2-step transform?

Again, it depends. Doing it all within one stylesheet may improve performance (note I say "may", certain frameworks may provide this advantage also to pipelines); but the stylesheets are harder to reuse/repurpose, debug etc. That is, it's the usual tradeoff. External factors, such as whether the stylesheet is a one-off or part of a production system, the run-time scenario and the rest all make a difference.


No simple answer. Scratch where it itches.

In the case of a stylesheet whose purpose is not a tree transformation, but rather a simple reformatting of the XML (that is, you're using XSLT not for its node manipulation but for the sake of driving your engine's serializer) -- I'd definitely say it should be kept separate from a regular-ol' stylesheet (that does node manipulations) simply because it can only be used in processors and situations where you're writing a file. This is an unnecessary price to pay, and since the combined stylesheet also becomes complex, brittle and hard to maintain -- why do it?

Cheers,
Wendell



abie

_________________________________________________________________
Compare Cable, DSL or Satellite plans: As low as $29.95.
https://broadband.msn.com


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


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



Current Thread