Re: XML/XSL and ASP/IIS

Subject: Re: XML/XSL and ASP/IIS
From: "Steven Livingstone" <s.livingstone@xxxxxxxxxxxxxx>
Date: Sat, 5 Jun 1999 18:52:00 +0100
There are reasons why I am doing it like this :

1. The user shall have to directly view the XML page with the applied XSL
stylesheet.

2. Site Server P&M has to be integrated, so ASP has to be used as I use this
to determine security levels on the server and send the appropriate XML
rather than sending it all to the client and so secure info can be viewed.

thanks for your response -
Steven


Steven Livingstone
Director, Networking Technical Associates
The Citi Exchange - http://www.citix.com
Scottish President AIP - http://www.citix.com/AIP
email : ceo@xxxxxxxxx
-----Original Message-----
From: Jonathan Borden <jborden@xxxxxxxxxxxx>
To: xsl-list@xxxxxxxxxxxxxxxx <xsl-list@xxxxxxxxxxxxxxxx>
Date: Saturday, June 05, 1999 6:37 PM
Subject: RE: XML/XSL and ASP/IIS


>Mapping the .xsl extension to asp.dll seems confusing to me. What you are
>attempting to do is to pass parameters to the XSL stylesheet. The most
>efficient way to do this is to pass parameters as top level attributes of
>the XML document itself e.g.:
>
> objXML.setAttribute("color","red");
> objXML.setAttribute("language","italian");
> var str = objXML.transformNode(objXSL);
>
>This allows the client to cache the XSL stylesheet, eliminates the overhead
>of server processing and eliminates the network roundtrip associated with
>the transformation.
>
>You can use XSL conditionals such as
><xsl:if test=".[@color = 'red']">
>or
><xsl:choose><xsl:when test="/*[@language='italian']">
>
>to do this.
>
>Using XSL and client side transformation, I have been able to greatly
reduce
>the need to use ASP, saving this for appropriate uses such as database
>access/updates and other transactions.
>
>Jonathan Borden
>http://jabr.ne.mediaone.net
>
>
>>
>> Hi there - well, I've tried this with half success/half failure.
>>
>> I I run the file below, low.xsl, directly from a web page, and
>> after having
>> mapped it's MIME type to the asp.dll, then I can do everything as I
>> expected.
>>
>> However, when I use the following in my asp page,
>>
>>     strOutput = objXML.transformNode(objXSL)
>>
>> I am unable to get any response back in strOutput. I don't know what the
>> problem is as I would still expect the .xsl file to be parsed by
>> asp.dll and
>> the resuting page to be returned - as soon as I take the ASP stuuf out of
>> the low.xsl file, everything works using strOutput =
>> objXML.transformNode(objXSL).
>>
>> What am I doing wrong, or is there a better/another way to do this?
>>
>> Thanks
>> Steven
>>
>> "low.xsl"
>> ====================================================
>> <?xml version="1.0"?>
>> <HTML xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
>> <LINK REL="stylesheet" TYPE="text/css" HREF="english.css" />
>>   <BODY STYLE="font-family:Arial, helvetica, sans-serif; font-size:10pt;
>> background-color:#EEEEEE">
>> <%If Request.QueryString("color")="red" Then%>
>>       <DIV STYLE="background-color:red; color:white; padding:4px">
>> <%Else%>
>>  <DIV STYLE="background-color:teal; color:white; padding:4px">
>> <%End If%>
>>         <SPAN STYLE="font-weight:bold; color:white">
>>    <xsl:value-of select="document/title"/> by
>>    <xsl:value-of select="document/author"/></SPAN>
>>       </DIV>
>>       <DIV class="english" STYLE="background-color:darkblue; color:white;
>> padding:4px">
>>         <SPAN STYLE="font-weight:bold; color:white;">
>>    <xsl:value-of select="document/abstract/English"/>
>>   </SPAN>
>>       </DIV>
>>       <DIV class="italian" STYLE="background-color:darkblue; color:white;
>> padding:4px">
>>         <SPAN STYLE="font-weight:bold; color:white;">
>>    <xsl:value-of select="document/abstract/Italian"/>
>>   </SPAN>
>>       </DIV>
>>   </BODY>
>> </HTML>
>
>
> 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