|
Subject: RE: [xsl] Assigning a dynamic value of href in a stylesheet PI From: "bryan" <bry@xxxxxxxxxx> Date: Thu, 25 Jul 2002 19:46:46 +0200 |
><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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Assigning a dynamic value, Michael Kay | Thread | [xsl] ANN: XSLT Tools and Resources, Chuck White |
| [xsl] need help on stylesheet effic, Malia Zaheer | Date | RE: [xsl] need help on stylesheet e, Michael Kay |
| Month |