Perhaps a simple question, but one that I'm currently stuck on:

I'm using Tom Duffy's article as a base for creating a javascript tree control with an xml base. Article is at http://www.windx.com/getHelpOn/Article/11874/0/page/1 .

At any rate, after populating the xml, things more or less look snazzy. Except one issue. The sample html that was included on that tutorial uses an iframe as the tree menu container and the body is just a div. Great, sounds fantastic. Only problem, every recurring link clicked within the tree opens within the tree iframe and not in the content area.

I did a bit of tweaking here and there and the closest I've gotten so far was to specify (in the xsl, not the html itself) to set a base target for the content div. Now, it at least opens in a new window rather than the tree.

But my question now is, where did I go wrong? Is this as simple as not being able to use a div for a base target? Or is it that the value specified in the xsl not going to be carried over when the html is rendered? I can specify the base target in both the html page's head, or in the html page's iframe call, but same result as well.

All I want to do is take what is a nicely-designed script pattern supplied on the site and tweak it so that links open in the rendered content frame. Any ideas?

The sample scripts are supplied within the above link, but I'll show you the html and the xsl (with my base target added) here. Thanks

- - - - - - -

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xslutput method="html"></xslutput>
<xsl:template match="/">
<title>XML Tree Control</title>
<link rel="stylesheet" type="text/css" href="xmlTree.css"/>
<script type="text/javascript" src="xmlTree.js"></script>
<base target="content"/>

<xsl:template match="tree">

<xsl:template match="branch">
<span class="trigger">
<xsl:attribute name="onClick">
showBranch('<xsl:value-of select="@id"/>');
<img src="closed.gif">
<xsl:attribute name="id">I<xsl:value-of select="@id"/></xsl:attribute>
<xsl:value-of select="branchText"/>
<span class="branch">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>

<xsl:template match="leaf">
<img src="doc.gif"/>
<xsl:attribute name="href" >
<xsl:value-of select="link"/>
<xsl:value-of select="leafText"/>

<!-- avoid output of text node with default template -->
<xsl:template match="branchText"/>


- - - - - - -

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>Embedded XML Tree Control</title>
<style type="text/css">
border-right:1px black solid;
border-top: none;
border-bottom: none;
position: absolute;
width: 250;
left: 160;
font-family: sans-serif;
color: navy;
<script type="text/javascript">
function setHeight(){
var availableHeight = 0;

availableHeight = document.body.clientHeight;
availableHeight = innerHeight;

var tree = document.getElementById('tree').style;
tree.height = availableHeight-20;

<body onload="setHeight()">
<iframe id="tree" src="tree.xml"><base target="content></iframe>

<div id="content">
<h2>Page Content Here</h2>