|
[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
><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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








