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

Re: Converting <xml> StyleSheet param contents into a

Subject: Re: Converting <xml> StyleSheet param contents into a node set?
From: Jacquo Johnson <genxgeek@xxxxxxxxx>
Date: Wed, 17 Aug 2005 01:23:44 -0600
xml stylesheet passing parameters
Looks like the stylesheet param method only accepts a key as a string
and the expression as a string as well.  This is a wrapper over a
Xalan/Xerces C/C++ (Xalan1.5, Xerces2.6)

SetStyleSheetParam (const STD(wstring) & inKey, const STD(wstring) &
inExpression);

So I am stuck with passing the contents as a string.

On 8/17/05, Jacquo Johnson <genxgeek@xxxxxxxxx> wrote:
> Thanks for the reply, Michael!  The XSLT version is 1.0 and I'm using
> Xalan v1.5 or v1.6 of the C/C++ for this specific application
> solution.  I'm testing the raw transform itself  via JEdit using the
> lastest build of the XSLT plugin for Xalan Java (not sure what version
> that is).
>
> However, I would like to avoid any disk i/o or uri specification for
> this solution due to high message volume and fault tolerance.  Since I
> recieve the xml filter specification within a Xerces Dom Document as
> passed from a server I would like to  take the filter xml contents and
> pass it into an existing stylesheet as xml contents
> <Filter>....</Filter> itself.  This is all happening on the client
> side in mememory and the only way that I can think of adhering to this
> requirement is parsing the filtered xml node xml contents into an
> existing stylesheet as a parameter.
>
> Thoughts?
>
> On 8/17/05, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > The way you pass parameters to a stylesheet depends on the API of the
XSLT
> > processor that you are using. Many will allow you to pass a DOM Document
> > node.
> >
> > If you're using Saxon from the command line, the parameter
> > +Filter=filter.xml causes the file filter.xml to be parsed, and the
> > resulting document (root) node becomes the value of the parameter.
> >
> > Another approach is to pass the URI as the stylesheet parameter, and then
> > call document() from within the stylesheet.
> >
> > Michael Kay
> > http://www.saxonica.com/
> >
> > > -----Original Message-----
> > > From: Jacquo Johnson [mailto:genxgeek@xxxxxxxxx]
> > > Sent: 17 August 2005 02:07
> > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > Subject:  Converting <xml> StyleSheet param contents
> > > into a node set?
> > >
> > > HI all, can somebody tell me how I can pass <xml> contents into a
> > > stylesheet param and then convert that <xml> contents into a nodeset?
> > >
> > >
> > > Stylesheet: ( Filter=<Node><Whatever/></Node> )
> > > ...
> > > <xsl:param name="Filter" select="string('NULL')" />
> > >
> > >    <xsl:copy-of select="$Filter"/>
> > > ...
> > > Output:
> > >    &lt;Node&gt;&lt;Whatever/&gt;&lt;/Node&gt;
> > >
> > > However, I want to turn the xml contents above into a node set that I
> > > can later use in the transform.  Is that possible (is there something
> > > other than using CDATA)?
> > >
> > > Any information would be greatly appreciated.

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.