[xsl] strange problem

Subject: [xsl] strange problem
From: "SAL ROSALES Jr." <salrosales@xxxxxxxxxxx>
Date: Thu, 21 Nov 2002 10:39:37 -0800 (PST)
Hi everyone,

Thanks for all your previous help. I'm new to XSL and
Microsoft Sharepoint portal server, which is why I'm
using xsl, this list is a god send.

My latest problem, I hope there's someone who is
slightly familiar with Sharepoint or MS exchange
because they both use the same backend WSS (Web
Storage System)

I'm using an <xsl:choose><xsl:when> as someone on the
list earlier suggested, except that I'm trying to test
for a value in the WSS. My code should shed some more
light:

<xsl:choose>
						<xsl:when test="@name[.='StartDate']">
							<SCRIPT language=javascript>			
							fld = new DateField(frm,'<xsl:value-of
select="@fieldname"/>','<xsl:value-of
select="@name"/>',MyCurrentDate);fld.fDateOnly =
false;fld.BuildUI();
							</SCRIPT>*This is a required field
							<br/>
							<SPAN class="ms-formdescription"></SPAN>							

							</xsl:when>
								<xsl:when test="@name[.='EndDate']">
									<SCRIPT language=javascript>							
									fld = new DateField(frm,'<xsl:value-of
select="@fieldname"/>','<xsl:value-of
select="@name"/>',MyForwardDate);fld.fDateOnly =
false;fld.BuildUI();
									</SCRIPT>Announcement may be displayed for up
to 14 days	
									<br/>
									<SPAN class="ms-formdescription"></SPAN>					
	
								</xsl:when>
							</xsl:choose>

Them code above is working fine, what it does is it
reads an xml file that has some preset definitions of
some html text input fields and the code above pulls
from that to dynamically create html text input fields
and inserts into the 'value' attribute of the text
field today's date (which corresponds to the variable
Mycurrentdate). It also places an End Date value
(MyForwardDate) which will be todays date + 14. 

Anyway, I have a value that is pulled from the WSS,
which is sort of like a database, that is represented
by this XSL tag: <xsl:value-of select="."/> I need to
tell XSL if there is a value within this <xsl:value-of
select="."/> DO NOT insert the current date, insert
the value represented by <xsl:value-of select="."/>.

I hope this makes sense because its sort of abstract
to me and difficult to explain. I just don't know how
to grab this value before run-time, make a comparison
and have XSL do what its supposed to do accordingly.

thanks again,

Sal

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread