Problem with xslt in a select field

RESOLVED INVALID

Status

()

RESOLVED INVALID
15 years ago
15 years ago

People

(Reporter: rw_mfa, Assigned: peterv)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; pt-BR; rv:1.3.1) Gecko/20030425
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; pt-BR; rv:1.3.1) Gecko/20030425

<?xml version='1.0' encoding='iso-8859-1'?>
<?xml-stylesheet type="text/xsl" href="tt.xsl"?>
<pagina>
    <formulario>
    <nome>nome</nome>
    <campos>
    <lista>
	<option>VersionA</option>
	<option>VersionB</option>
	<option>VersionC</option>
	<option>VersionD</option>
    </lista>
    </campos>
    </formulario>
</pagina>

<!-- end of xml code -->

<!-- start of xsl code -->
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="html"/>
<xsl:template match="/">

<html>
<head></head>
<body>
   <xsl:for-each select="pagina/formulario/campos">

     <xsl:element name="select">
        <xsl:copy-of select="./lista"/>
     </xsl:element>

   </xsl:for-each>

</body>
</html>
</xsl:template>
</xsl:stylesheet>

<!-- end of xsl code -->




Reproducible: Always

Steps to Reproduce:
1.Load the xml file 
2.
3.

Actual Results:  
Field "select" get stranger

Expected Results:  
Show the field correctly.

In details I paste de xml code and xslt code, both are in separate files.
I don't know if this, can be a error in my code or a bug in mozilla browser.
In my Internet Explorer browser this work.

Sorry for my English. 

Thank you.
.
Assignee: general → peterv
Component: Browser-General → XSLT
QA Contact: general → keith

Comment 2

15 years ago
Robert, in the result page, press crtl-shift-I to get to DOM inspector for your
result.
There you'll notice that the first child of the select element is <lista>.
That confuses layout. IE prolly kills that during parsing the result.

     <xsl:element name="select">
        <xsl:copy-of select="./lista/*"/>
     </xsl:element>
works for me. Note the /* to just copy the children of lista, instead of lista
itself.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.