Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Re: Problem using msxsl:node-set with xsl:param

Reply
Thread Tools

Re: Problem using msxsl:node-set with xsl:param

 
 
Patrick Gresham
Guest
Posts: n/a
 
      08-20-2003
You get credit for the assist. Your response was not exactly correct,
but good enough. The solution is one of those things that make me say
wow!

First, you were on the right track with "why convert the node set to a
string when it is already an xml doc." So I made this adjustment in the
javascript

i.e.:
processor.addParameter("xmlDoc", xmlId)
not
processor.addParameter("xmlDoc", xmlId.documentElement)

Next, once the parameter is passed to the XSL, it is a tree fragment,
set of nodes. You have to call xxx:node-set() so that XSL will treat it
is such.

i.e.
<xslaram name="xmlDoc" select="." />
<xsl:value-of select="msxsl:node-set($xmlDoc/Element)" />

This is so cool because you can pass multiple XML documents
to the XSL stylesheet dynamically. This will come into use when you are
building a select list of options with an external document and the
source document stores the option selected.

I am posting this because I am sure some poor soul will spend 3 days on
this as I have. By the way, you have to include a urn with the node-set
function available. You can get that from msxsl, xalan, and others.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Patrick Gresham
Guest
Posts: n/a
 
      08-20-2003


Opps made a typo in the example above:
<xsl:value-of select="msxsl:node-set($xmlDoc)/Element" />

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Dimitre Novatchev
Guest
Posts: n/a
 
      08-21-2003

"Patrick Gresham" <(E-Mail Removed)> wrote in message
news:3f43f008$0$194$(E-Mail Removed)...
> You get credit for the assist. Your response was not exactly correct,
> but good enough. The solution is one of those things that make me say
> wow!
>
> First, you were on the right track with "why convert the node set to a
> string when it is already an xml doc." So I made this adjustment in the
> javascript
>
> i.e.:
> processor.addParameter("xmlDoc", xmlId)
> not
> processor.addParameter("xmlDoc", xmlId.documentElement)
>
> Next, once the parameter is passed to the XSL, it is a tree fragment,
> set of nodes. You have to call xxx:node-set() so that XSL will treat it
> is such.
>
> i.e.
> <xslaram name="xmlDoc" select="." />
> <xsl:value-of select="msxsl:node-set($xmlDoc/Element)" />


No. It is just a regular node-set. Remove the call to the msxsl:node-set()
ext. function and see that you'll get no error.

The definition of an RTF requires that its contents is produced by the
transformation itself. Also, an RTF is defined *only* as the contents of an
xsl:variable. Both of these two conditions are not satisfied in your
example.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using problem reporting Kue2 Windows 64bit 3 01-15-2010 08:07 PM
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM
Problem connecting to https using ZSI (openssl problem) - python2.3 Adil Hasan Python 3 01-29-2004 12:27 AM
Using GetOleDbSchemaTable to get SQL Server Field Description - using pete ASP .Net 1 08-29-2003 10:50 AM
Re: MVP? Index error on nested element using System.xml but NOT using msxml??? William F. Robertson, Jr. ASP .Net 1 06-25-2003 08:08 PM



Advertisments