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

Re: Xml searchengine


culus
what processor are you using to transform your stylesheet?  and how
are you currently invoking this transform? via php?

If you desire it to generate a different layout based on the user
selection on the form (via a dropdown?  radio? either way its the same
general idea) you need to do one of two things.  Either use the value
of that form element (accessed via whatever server scripting language
you are using) outside of the transform to select the proper
stylesheet to use for the transform or pass it in as a parameter to
the stylesheet via your server script mechanism and use an
xsl:choose[xsl:when | xsl:otherwise] code block to test the value of
this parameter and then pass the transform to the proper named
template which contains the desired transformation logic.  The key
technologies in which you need to learn are:

Learning how to access the form element value.  It seems you must
already be doing this for other parts of the form?

Choose what stylesheet to use to transform the XML based on the user input

  or

Pass the value of this form element/field into the transformation
process via the mechanism implemented by your combination of server
side script and processor of choice.

Access that value via a predefined xsl:param within the stylesheet

Use the suggested choose[when|otherwise] code block mechanism (with
the test attribute of the choose element(s)) and when the test
evaluates to true call a particular named template with any additional
parameters needed for processing.

There are two places that you can learn all of these things (except
the server side scipting -- neither of these focus on this although
they both may have samples that invoke a transform via your chosen
script/processor -- you'll just have to llok):

Dave Pawsons XSL-List FAQ:
http://dpawson.co.uk/xsl/index.html

and

Jeni Tennison's XML/XSLT Pages:
http://www.jenitennison.com/xslt/index.html

This should get you going in the right direction.  I wont be around
much longer myself so let me suggest that if your questions are server
side scripting related that there is someone on this list that will
know the answer but if its XSLT related although everyone here is more
than capable you will find better luck getting answers where the focus
is XSLT -- via XSL-List >>
http://www.mulberrytech.com/xsl/xsl-list/index.html

Hope this helps get you to where you need to be...  If I am around and
more help is needed I'll help point you in the right direction but I
doubt I'll be around so hopefully someone else will be who can point
you appropriatelly.

Best of luck!

<M:D/>


On Wed, 26 Jan 2005 09:50:47 +0000 (GMT), Eric Culus
<thepofo@y...> wrote:
> Hi David,
> 
> If it's possible, the server allowes me to use php and
> maybe some perl script(cgi-bin)...
> I thank you for your response.
> 
> My client will be happy (I'm allready late on
> delivering :-( )
> 
> Eric
> 
>  --- "M. David Peterson" <m.david.x2x2x@g...>
> wrote:
> > Eric,
> >
> > Are you looking to do this client-side or server?
> > The answer either
> > way is pretty straight forward but an entirely
> > different process
> > depending on the machine doing the transformation.
> >
> > One thing...  you are more likely to find the answer
> > to this question
> > over on XSL-List as this is where the XSL focused
> > tend to hang out.
> >
> > >> http://www.mulberrytech.com/xsl/xsl-list <<
> >
> > In this case depending on the level at which you
> > plan to take this it
> > may not matter as I have the answer for you either
> > way and in fact if
> > it is server side and you use a dynamic language
> > like Python or Perl
> > or the likes you may find the folks over here a
> > little more willing
> > and able to give you advice on how to use whatever
> > your natural
> > language is to do the form and search processing and
> > what have you...
> > but lets see what level that is first before I push
> > you too far one
> > way or the other...
> >
> > Cheers :)
> >
> > <M:D/>
> >
> >
> > On Wed, 26 Jan 2005 06:53:51 +0000 (GMT), eric culus
> > <thepofo@y...> wrote:
> > > Hi,
> > >
> > > I have an xsl page which outputs my xml file into
> > a
> > > nice pagelayout. On that page is a searchform.
> > What
> > > I'd like to do is let the user select the output
> > > accordingly to his selection the form.
> > >
> > > How do I do this...
> > > This has been puzzeling for a while now...
> > >
> > > All help appreciated.
> > > Eric
> > >
> > >
> >
> ___________________________________________________________
> > > ALL-NEW Yahoo! Messenger - all new features - even
> > more fun! http://uk.messenger.yahoo.com
> > >
> > >
> >
> -----------------------------------------------------------------
> > > The xml-dev list is sponsored by XML.org
> > <http://www.xml.org>, an
> > > initiative of OASIS <http://www.oasis-open.org>
> > >
> > > The list archives are at
> > http://lists.xml.org/archives/xml-dev/
> > >
> > > To subscribe or unsubscribe from this list use the
> > subscription
> > > manager:
> > <http://www.oasis-open.org/mlmanage/index.php>
> > >
> > >
> >
> >
> > --
> > <M:D/>
> >
> > :: M. David Peterson ::
> > XML & XML Transformations, C#, .NET, and Functional
> > Languages Specialist
> >
> >
> -----------------------------------------------------------------
> > The xml-dev list is sponsored by XML.org
> > <http://www.xml.org>, an
> > initiative of OASIS <http://www.oasis-open.org>
> >
> > The list archives are at
> > http://lists.xml.org/archives/xml-dev/
> >
> > To subscribe or unsubscribe from this list use the
> > subscription
> > manager:
> > <http://www.oasis-open.org/mlmanage/index.php>
> >
> >
> 
>                 
> ___________________________________________________________
> ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
> 


-- 
<M:D/>

:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.