XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Alexander FelbergSubject: Worked in ASP doesn't work in ASP.NET
Author: Alexander Felberg
Date: 04 Feb 2005 03:25 PM
Here are the parts of the code in .xsl file that worked in ASP and
don't work in ASP.NET:
..................
<xsl:variable name="FROWCOUNT">
<xsl:value-of select="document('FREQUENCY.xml')/SURVEY/COMPONENT[SURV_CMPNT_LABL=$ICOMPONENT]/ITEMS[SURV_ITM_TITL=$ITEM]/FREQUENCY"/>
</xsl:variable>
..................
<xsl:if test="$FROWCOUNT !=''"> //Never get to this point, though
//there are Frequency values in
//the .xml file
<a>
<xsl:attribute name="HREF">BY_FREQUENCIES.asp?ITEM_NAME=<xsl:value-of select="SURV_ITM_TITL"/>&amp;COMPONENT=<xsl:value-of select="$ICOMPONENT"/>
</xsl:attribute>
</a>
</xsl:if>

Couldn't find a solution so far.

Postnext
Ivan PedruzziSubject: Worked in ASP doesn't work in ASP.NET
Author: Ivan Pedruzzi
Date: 07 Feb 2005 10:41 PM
Alexander,

Could you show us how you invoke the the transformation in the ASP code?
Did you try your XSLT using MSXML or .NET inside Stylus Studio?

Hope this helps
Ivan

Postnext
Alexander FelbergSubject: Worked in ASP doesn't work in ASP.NET
Author: Alexander Felberg
Date: 16 Feb 2005 04:55 PM
In my .xsl file, I declare a variable "FROWCOUNT" and check whether
there are any values at the child node "FREQUENCY" in the
"FREQUENCY.xml" file depending on the parameters "$ICOMPONENT" and
"$ITEM" that I pass to my .xsl file from .aspx page:

<xsl:variable name="FROWCOUNT">
<xsl:value-of select="document('FREQUENCY.xml')/SURVEY/COMPONENT[SURV_CMPNT_LABL=$ICOMPONENT]/ITEMS[SURV_ITM_TITL=$ITEM]/FREQUENCY"/>
</xsl:variable>

Then further in the code I check:
<xsl:if test="$FROWCOUNT !=''">
but never get here though there are values in the "FREQUENCY.xml".
I always get to the line:
<xsl:if test="$FROWCOUNT=''">

Postnext
Ivan PedruzziSubject: Worked in ASP doesn't work in ASP.NET
Author: Ivan Pedruzzi
Date: 17 Feb 2005 12:27 AM

Alexander

I would change the variable declaration to

<xsl:variable name="FROWCOUNT" select="document('FREQUENCY.xml')/SURVEY/COMPONENT[SURV_CMPNT_LABL=$ICOMPONENT]/ITEMS[SURV_ITM_TITL=$ITEM]/FREQUENCY"/>

then I would try a different test:

<xsl:if test="count($FROWCOUNT) > 0">

Hope this helps
Ivan

Posttop
Alexander FelbergSubject: Worked in ASP doesn't work in ASP.NET
Author: Alexander Felberg
Date: 17 Feb 2005 10:16 AM
Dear Ivan,

Thank you very much for helping me. I should have paid more attention to
your first response. The second version didn't work, but I managed to solve
the problem in the .aspx.cs file. The .xsl file wasn't giving me troubles
at all, as I thought in the beginning.
In my aspx.cs file when I was applying Transform() method, I wrote:
//xslt.Transform(doc, xslArg, writer, null);
instead of:
xslt.Transform(doc, xslArg, writer, resolver);

After I corrected this, the application works properly.

Thank you so much again for your time and great help.

Sincerely,
Alex.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.