[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: dropdown box - style !! urgent

Subject: RE: dropdown box - style !! urgent
From: xslshyam@xxxxxxxxxxxx
Date: 7 May 2001 01:49:38 -0700
list box style
Ya exactly that is the problem
thanks
Shyam

On Thu, 03 May 2001, Meltem Kogelbauer wrote:

> 
> I think I understand your problem.
> 
> try this for your combo box:
> <select>
>     <xsl:attribute name="style">
>         width:<xsl:value-of select="@MaximumLength" />
>     </xsl:attribute>
> ......
> </select>
> 
> Meltem
> 
> 
> 
> -----Original Message-----
> From: xslshyam@xxxxxxxxxxxx [mailto:xslshyam@xxxxxxxxxxxx]
> Sent: 28 April 2001 7:52 AM
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  dropdown box - style !! urgent
> 
> 
> Hi ALL
> 
>     I am shyam , working in an Indian based firm called Ramsoft
> Technologies. I am facing a problem with XSL in my current project. 
> 
> I have an xsl file which generates the html controls based on an XML DOM.
> the problem occurs in the case of Drop down list box.  I am not able to set
> the width of
> the combo box. How can I set the width? 
> 
> My XML DOM is something like this: 
> 
>  <DataItems> 
>  <DataItem Label = 'Result Priority:' Value = 'Routine' DataType =
> 'Restricted Dictionary' Mandatory = 'False' MaximumLength = '30'
> NumberOfLines = '1'/> 
>  <DataItem Label = 'Special Instructions:' Value = '' DataType = 'Free
> Format Text' Mandatory = 'True' MaximumLength = '255' NumberOfLines = '3'/> 
>  <DataItem Label = 'Priority' Value = '' DataType = 'Restricted Dictionary'
> Mandatory = 'False' MaximumLength = '30' NumberOfLines = '1'/> 
>   <DataItem Label = 'Rob&apos;s Check' Value = '' DataType = 'Checkbox'
> Mandatory = 'False' MaximumLength = '1' NumberOfLines = '0'/> 
> </DataItems> 
> 
> And the xsl file I am using is 
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> 
> 
> <!-- the match on the root node starts the HTML document--> 
> <xsl:template match="/"> 
> 
> <table> 
> 
>     <xsl:for-each select="//DataItems/DataItem"> 
>         <tr> 
>             <td id="lblLabelCol" nowrap="true"> 
>                 <p align="right"> 
>                     <label> 
>                         <xsl:if match=".[@Mandatory='True']"> 
>                            <img id="imgMandatory"
> src="../Images/BlueStar.jpg"></img> 
>                         </xsl:if> 
>                         <xsl:value-of select="@Label"/> 
>                     </label> 
>                 </p> 
>             </td> 
>   
>             <xsl:if match=".[@DataType='Checkbox']"> 
>                <td id="lblControlCol"> 
>                    <input class="OrderInfoCheckbox" type="checkbox"
> readonly="true" disabled="true"> 
>                        <xsl:attribute name="value"> 
>                            <xsl:value-of select="@Value"/> 
>                        </xsl:attribute> 
>                    </input> 
>                </td> 
>             </xsl:if> 
>   
>             <xsl:if match=".[@DataType='Free Format Text']"> 
>                 <td id="lblControlCol"> 
>                     <xsl:if match=".[@NumberOfLines>'1']"> 
>                         <textarea class="OrderInfoTextarea" readonly="true">
> 
>                             <xsl:attribute name="value"> 
>                                <xsl:value-of select="@Value"/> 
>                            </xsl:attribute> 
>                            <xsl:attribute name="cols"> 
>                                    <xsl:value-of select="@MaximumLength"/> 
>                            </xsl:attribute> 
>                            <xsl:attribute name="rows"> 
>                                    <xsl:value-of select="@NumberOfLines"/> 
>                            </xsl:attribute> 
>                         </textarea> 
>                     </xsl:if> 
>   
>                     <xsl:if match=".[@NumberOfLines='1']"> 
>                         <input class="OrderInfoLargeText" type="text"
> readonly="true"> 
>                             <xsl:attribute name="value"> 
>                                <xsl:value-of select="@Value"/> 
>                            </xsl:attribute> 
>                            <xsl:attribute name="size"> 
>                                    <xsl:value-of select="@MaximumLength"/> 
>                            </xsl:attribute> 
>                         </input> 
>                      </xsl:if> 
>                 </td> 
>             </xsl:if> 
>   
>             <xsl:if match=".[@DataType='Restricted Dictionary']"> 
>              <td id="lblControlCol"> 
>   
>                  <select id="lstDictionary" name="lstDictionary"
> class="OrderInfoList" readonly="true" disabled="true"> 
>                         <option><xsl:value-of select="@Value"/></option> 
>                     </select> 
>   
>              </td> 
>             </xsl:if> 
>         </tr> 
>     </xsl:for-each> 
> </table> 
> 
> </xsl:template> 
> </xsl:stylesheet> 
> 
> Here for setting the width for the combo box normally I should give
> "style=width:<MaximumLength>". But how will I make an xsl attribute
> "style=width:" 
> and how will I assign this length to the above attribute ?? 
> 
> I have one more doubth : This Maximum Length I am getting in characters. But
> I think the width attribute takes only in Pixels. % etc . How will i convert
> this
> characters in terms of pixels?? 
> 
> This project is meant to work only with IE 5.5 and I am using MSXML3.0 . 
> 
> I will be grateful to you for your response and it is quite urgent. 
> 
> Thanks and Regards 
> Shyam 
> 
> 
> ______________________________________________________
> 123India.com - India's Premier Portal 
> Get your Free Email Account at http://www.123india.com
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


______________________________________________________
123India.com - India's Premier Portal 
Get your Free Email Account at http://www.123india.com



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.