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

I don't get it... line breaks (sorry, I know this has

Subject: I don't get it... line breaks (sorry, I know this has been discussed many times)
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxx>
Date: Thu, 1 May 2003 08:07:23 -0700
xsl input type hidden
Ok, I have the following "for-each" which calls a template, the template
returns a hidden form variable.  When I *View Source* all of the elements
appear on the same line.  I mean, this isn't a horrible thing, but I'd like
to know how to control this behaviour.  I'm guessing that when you
"apply-templates" that the loop which occurs naturally (and I call it a
"natural" loop for lack of a better term) there in the match creates line
breaks in the source.  Correct?

Here is my "for-each":
         <xsl:for-each select="$xmTmplt/FLD">
             <xsl:call-template name="MAKE_HIDDEN_ATT"/>
         </xsl:for-each>

Here is my "call-template":
    <xsl:template name="MAKE_HIDDEN_ATT">
     <input type="hidden">
            <xsl:attribute name="name">typ_<xsl:value-of
select="@name"/></xsl:attribute>
            <xsl:attribute name="value"><xsl:value-of
select="@type"/></xsl:attribute>
     </input>
    </xsl:template>

So the question is - How would I make line breaks at each loop in the above?
Karl

And the result looks something like this (NO LINE BREAKS):
<input type="hidden" name="primarykey" value="usr_memberID"><input
type="hidden" name="primarykeyval" value="1"><input type="hidden" name="ax"
value="10"><input type="submit" value="Update Record"><input type="hidden"
name="typ_usr_memberID" value="int"><input type="hidden" name="typ_usr_UID"
value="string"><input type="hidden" name="typ_USR_PWD" value="string"><input
type="hidden" name="typ_fname" value="string"><input type="hidden"
name="typ_lname" value="string"><input type="hidden" name="typ_email"
value="string"><input type="hidden" name="typ_email2" value="string"><input
type="hidden" name="typ_email3" value="string"><input type="hidden"
name="typ_phone_home" value="string"><input type="hidden"
name="typ_phone_cell" value="string"><input type="hidden"
name="typ_phone_fax" value="string"><input type="hidden"
name="typ_phone_other" value="string"><input type="hidden"
name="typ_address1" value="string"><input type="hidden" name="typ_address2"
value="string"><input type="hidden" name="typ_city" value="string"><input
type="hidden" name="typ_state" value="string"><input type="hidden"
name="typ_zip" value="string"><input type="hidden" name="typ_notes"
value="string"><input type="hidden" name="typ_Hire_Date" value="date"><input
type="hidden" name="typ_Termination_Date" value="date"><input type="hidden"
name="typ_DOB" value="date">


 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.