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

RE: node-set from a string?

Subject: RE: node-set from a string?
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 3 Jul 2002 15:38:24 +0100
ora 20100
> I need to find a way to pass a well-formed XML string into an 
> XSLT transformation 

You can't do anything with a well-formed XML string until you have
parsed it; and there is no standard way of parsing XML from within a
transformation, so it's better to parse it first and then pass in the
resulting tree.

(Though Saxon 7.1 offers saxon:parse() as an extension function.)

The xx:node-set() function does something quite different.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

so that I can 
>     a) Extract a bit of data from it to use during the transform
>     b) Pass the string intact so that it becomes the value of an 
>     HTML input in a web page which can subsequently submitted to 
>     another page so as to preserve state information.
> 
> I am working with the Oracle XML Developer's Kit which I have used 
> sucessfully for some months now. Now I'm coming to a feature which 
> I haven't used before, but I've seen it discussed on the list from 
> time to time.
> 
> I think I need to use the "oracle:node-set()" function to draw this 
> string into an object (a node-set object) on which I can use XPath 
> to extract the the bit of data I need during the transformation.
> 
> Looking on page 758 of XSLT Programmer's Reference (2nd Edition), I 
> see what looks like the nugget I'm looking for. Except for 
> one thing. What I want to turn into a node-set comes into my 
> XSLT as a parameter.
> 
> This parameter is a string (I've doubly-quoted it so that the 
> processor
> 
> does not try to interpret it as an XPath statement. The example in the
> 
> book uses unquoted, literal XHTML in defining the content of 
> the variable.
> 
> Here is the place where I try to make the magic happen:
> 
> ...
> <xsl:param name="passThroughs" />
>  <xsl:template match="/">
>   <xsl:variable name="passThroughDoc" 
> select="oracle:node-set($passThroughs)"
>     xmlns:oracle="http://www.oracle.com/XSL/Transform/java" 
> /> ... And here is the error message I get when I fail:
> ORA-20100: Error occurred while processing: XSL-1019: 
>   (Error) Expected 'result-tree-fragment' instead of 'string'.
> 
> Am I completely on the wrong path here, or is there some small thing
> 
> which has escaped my notice?
> 
> Thanks.
> 
> -- 
> Charles Knell
> cknell@xxxxxxxxxx - email
>  
> 
>  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.