[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: node-set() function in MSXML?

Subject: RE: node-set() function in MSXML?
From: Andrew Kimball <akimball@xxxxxxxxxxxxx>
Date: Wed, 2 Aug 2000 11:40:53 -0700
ora node set
Evan,

I plan to remove the non-conformant implicit cast from RTF to node-set
before RTM, and replace it with an msxsl:node-set() explicit cast function.

~Andy Kimball
MSXSL Dev

-----Original Message-----
From: Evan Lenz [mailto:elenz@xxxxxxxxxxx]
Sent: Wednesday, August 02, 2000 9:31 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: RE: node-set() function in MSXML?



I tried your stylesheet with Saxon and with MSXML3, and it worked for both.
However, I still don't entirely trust it.  Is it really safe to assume that
the processor will not choke on the attempt to access an RTF as a node-set
because it won't come across that code at run-time?  Especially if we're
talking about compiling stylesheets--that's where I'd have my doubts about
this stylesheet's portability.  I'd be particularly interested to hear what
Michael Kay has to say about this.

Thanks,

Evan Lenz
elenz@xxxxxxxxxxx

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Steve Muench
Sent: Tuesday, August 01, 2000 6:53 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: node-set() function in MSXML?

Not the most elegant in the world, but this stylesheet
is a tweaked example of my earlier one that works on
both MSXSL3 and OracleXSL. Similar strategy could be
used for adding compatibility with other engines like
Saxon, XT, Xalan, etc.

<test xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:ora="http://www.oracle.com/XSL/Transform/java/"
      xsl:exclude-result-prefixes="ora">
  <xsl:variable name="x">
    <a>
      <b>one</b>
      <b>two</b>
    </a>
  </xsl:variable>
  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
  <xsl:choose>
    <!-- Let MSXSL3 coerce RTF in $x to nodeset -->
    <xsl:when test="contains($vendor,'Microsoft')">
      <xsl:for-each select="$x/a/b">
        <c><xsl:value-of select="."/></c>
      </xsl:for-each>
    </xsl:when>
    <!-- Use built-in ora:node-set() extension function -->
    <xsl:when test="contains($vendor,'Oracle')">
      <xsl:for-each select="ora:node-set($x)/a/b">
        <c><xsl:value-of select="."/></c>
      </xsl:for-each>
    </xsl:when>
  </xsl:choose>
</test>

______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/



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


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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.