Subject: [xsl] problem with name="type" in html input tag From: Jo Bourne <venus@xxxxxxxxx> Date: Sun, 13 May 2001 20:16:09 +1000 |
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" /> // [...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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] union and difference, Trevor Nash | Thread | Re: [xsl] problem with name="type" , Trevor Nash |
[xsl] union and difference, Steve Renshaw | Date | Re: [xsl] union and difference, Trevor Nash |
Month |