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: Wed, 10 Sep 2003 18:31:51 -0400
Abie,

At 06:01 PM 9/10/2003, you wrote:

I just looked up the node-set() extension function for msxml3...
so if I have a variable:
<xsl:variable name="tree">
 <form name="form1">
   <control name="control1"/>
 </form>
 <form name="form2>
   <control name="control1"/>
   <control name="control2"/>
 </form>
</xsl:variable>

I can use all the normal retrieval and counting mechanisms that I use on the source document?
- like: <xsl:apply-templates select="node-set($tree)/form[@name='form1']/control"/>
?

Yup.


I have been reluctant to use extension functions b/c I didn't want to base my design on things that are vendor dependant and that could possibly not be there even for the same vendor in the next release.

Understood: this is a valid and well-founded concern (not to say "well-formed").


If you want to ply the absolutely straight and narrow, avoid it. 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).

Should you use it? That I cannot say. Is it a concern? Always. Tactical decisions must be informed by strategy, which will tell you what kinds of risks you can take.

Cheers,
Wendell



======================================================================
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