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

RE: How to open a page in xsl

Subject: RE: How to open a page in xsl
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Wed, 24 Sep 2003 18:30:21 -0700
xsl redirect page
Hi,

I am jumping in on this thread late and without reading the previous posts.
You cannot transform this 'redirect' -- simply not possible. If you are
using a client-side transformation then you could simply forego the
transformation and change the location.href. 

Perhaps I am way off, but you probably want something like this:


> <xsl:template match="/">

    <html>
      <head>
>   <xsl:if test="contains($userid, 'yahoo')">

      <!-- this will redirect the browser after it loads the page -->
      <meta http-equiv="refresh" 
        content="0;url=http://www.yahoo.com"/>

>   </xsl:if>
> </xsl:template>

      </head>

    <body>
      <xsl:choose>
        <xsl:when test="contains($userid, 'yahoo')">
          <div>
            If not redirected, click <a href=" http://www.yahoo.com
">this</a>.
          </div>
        </xsl:when>
        <xsl:otherwise>
...

Best,
-Rob


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-
> list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Archana Rao
> Sent: Wednesday, September 24, 2003 5:46 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> 
> Herez the piece of code.
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:param name="userid" select="xyz@xxxxxxxxx"/>
> 
> <xsl:template match="/">
> 
>   <xsl:if test="contains($userid, 'yahoo')">
>      <!-- Goto http://www.yahoo.com -- >
>   </xsl:if>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> Hope this helps,
> 
> Basically i want this xsl to redirect to different
> pages depending on the domain name in the userid.
> 
> Thanks,
> Archana
> 
> --- Michael Kay <mhk@xxxxxxxxx> wrote:
> > >
> > > So i know what the username is, now my problem is
> > i am
> > > trying to open up www.yahoo.com if the username is
> >
> > > xyz@xxxxxxxxx and www.hotmail.com if the username
> > has xyz@xxxxxxxxxxxx
> > >
> > > I know i can use <xsl:if test="contain($username,
> > > 'yahoo')"> to check for the username, but then i
> > don't
> > > know how to specify in the <xsl:if> to open up
> > > www.yahoo.com.
> > >
> > > Hope you understood my problem.
> > >
> >
> > No, sorry, I don't. I haven't the faintest idea what
> > you mean by
> > "opening up www.yahoo.com". XSLT transforms a source
> > tree into a result
> > tree, where does "opening up" a web site fit into
> > this?
> >
> > Michael Kay
> >
> >
> >  XSL-List info and archive:
> > http://www.mulberrytech.com/xsl/xsl-list
> >
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
>  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.