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

problem with name="type" in html input tag

Subject: problem with name="type" in html input tag
From: Jo Bourne <venus@xxxxxxxxx>
Date: Sun, 13 May 2001 20:16:09 +1000
input type in html
Hi,

I am using cocoon 1.8.2 and am trying to establish if the problem I am experiencing is a bug in cocoon or something to do with xsl transformations that I am unaware of.

my problem is that in copying a html input tag from my xml source to my html output the attribute type="hidden" is being deleted if, and only if, the value of the name attribute is "type". eg <input name="type" type="hidden" ... >

the following code appears in my xml document:

<the_item>
	[...more xml....]
<Stories_type field_name="type" type="input_hidden"><input type="hidden" name="storytype"  value="54" /></Stories_type>
<Stories_type field_name="type" type="display">Feature</Stories_type>
	[...more xml....]
</the_item>

the following part of my xsl has been copying this and all sorts of other similar tags to the output for months without problem:

<xsl:template match="the_item">
	<xsl:for-each select="*[@type='input_hidden']">
		<xsl:copy-of select="./*|./text()"/>
	</xsl:for-each>
	<xsl:for-each select="*[@type!='input_hidden' and @type!='buttons' and @type!='scripts' and @type!='small_popup' and @type!='other_creator']">
		[...formatting....]
		<xsl:value-of select="key('field_titles', name())/@title" />&#160;//
		[...formatting....]
		<xsl:copy-of select="./*|./text()"/>
		[...formatting....]
	</xsl:for-each>

	[...more xsl....]

</xsl:template>

however, today when I tried to use the above xsl with the following, the type="hidden" was deleted from the input tag that was copied to the output, the only thing I changed was the name attribute of the input tag in the input xml from "storyType" to "type"

<the_item>
	[...more xml....]
<Stories_type field_name="type" type="input_hidden"><input type="hidden" name="type"  value="54" /></Stories_type>
<Stories_type field_name="type" type="display">Feature</Stories_type>
	[...more xml....]
</the_item>

has anyone else encountered a problem like this before? I am thinking it must be a bug in cocoons output formatter, but I just wanted to make sure it is not something stupid that I have overlooked.

cheers
jo
-- 
Jo Bourne
Virtual Artists Pty Ltd

 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.