Closed Bug 125520 Opened 23 years ago Closed 22 years ago

xul tree is displayed correctly if created via xsl

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: apm, Assigned: hewitt)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204
BuildID:    2002020415

In the page below, XUL tree comtains the only row although it must contain two
ones. DOM inspector indicates elements are ok, but somehow they ain't displayed.

Reproducible: Always
Steps to Reproduce:
1. save files from below
2. open .xml in browser

Actual Results:  tree with single row is displayed

Expected Results:  tree with two rows should be displayed

----(cut: blank.xml)----
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="blank.xsl"?>

<forms>
<ns id="foobar">
<input name="input0"> </input>
</ns>
</forms>

----(cut: blank.xsl)----
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>

<xsl:output method="xml" media-type="text/xul"
doctype-system="chrome://test/locale/test.dtd"/>

<xsl:template match="forms">
<xul:window>
<xul:tree>
<xul:treecolgroup>
<xul:treecol flex="1"/>
</xul:treecolgroup>

<xsl:apply-templates/>

</xul:tree>
</xul:window>
</xsl:template>

<xsl:template match="ns">
<xul:treechildren flex="1">
<xul:treeitem container="true" open="true">
<xul:treerow>
<xul:treecell class="treecell-indent">
<xsl:attribute name="label"><xsl:value-of select="@id"/></xsl:attribute>
</xul:treecell>
</xul:treerow>

<xsl:apply-templates/>

</xul:treeitem>
</xul:treechildren>
</xsl:template>

<xsl:template match="input">
<xul:treechildren flex="1">
<xul:treeitem>
<xul:treerow>
<xul:treecell class="treecell-indent">
<xsl:attribute name="label"><xsl:value-of select="@name"/></xsl:attribute>
</xul:treecell>
</xul:treerow>
</xul:treeitem>
</xul:treechildren>
</xsl:template>

</xsl:stylesheet>
i just found a reason - there's a #text element in DOM right before 2nd
treechildren. it is created from whitespaces found in XML file and prohibits
displaying of the following row.
Target Milestone: --- → Future
tree is no more
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.