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

RE: Assigning a dynamic value of href in a stylesheet

Subject: RE: Assigning a dynamic value of href in a stylesheet PI
From: "bryan" <bry@xxxxxxxxxx>
Date: Thu, 25 Jul 2002 19:46:46 +0200
href pass values dynamic
><xsl:template match="/">
>    <xsl:processing-instruction name="xml-stylesheet">
>         href="{concat($client, "-part-styler.xsl")} type="text/xsl"
>   </xsl:processing-instruction>
></xsl:template>
as others already pointed out you could say 
<xsl:processing-instruction name="xml-stylesheet">
href="<xsl:value-of select="concat($client,'-part-styler.xsl')"/>"
type="text/xsl"
</xsl:processing-instruction>

however I have to wonder if maybe instead of passing in stuff like ie5
or netscape as the value of your $client if you shouldn't try to
discover some common condition to your clients, i.e have a class of
clients, as it would no doubt make it easier to code.
Also you can check for your processor inside your stylesheet with 
function-available()

>OFFTOPIC: Does anyone know how a HTTP header indicates that the client
>is Netscape (as opposed to IE)?  The HTTP user-agent header field
>contains MSIE if the client is IE.  If the client is Netscape there
>doesn't seem to be any way of identifying that the client is Netscape. 
>Any ideas?

I don't know I've always been able to find that the HTTP_USER_AGENT
contains Netscape if I get a Netscape browser, I can't be more specific
than that without knowing your environment. Browse to this site for
examples of various user_agent strings:
http://www.zytrax.com/tech/web/browser_ids.htm




 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.