This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
expandble list in XSL
- To: XSL-List at mulberrytech dot com
- Subject: expandble list in XSL
- From: "Johan Andreasson" <johan_andreasson at hotmail dot com>
- Date: Thu, 30 Mar 2000 05:44:54 PST
- Reply-To: xsl-list at mulberrytech dot com
In HTML, when you want to have an expandable list, following is concvinient:
<SCRIPT>
var xxxx_exposed = false; <---- 2.
var yyyy_exposed = false;
var zzzz_exposed = false;
function show_details(obj)
{
if ( eval(obj.id+"_exposed" ) == false ) // expand the list
{
obj.insertAdjacentHTML("BeforeEnd",
document.all[obj.id+"_list"].innerHTML);
eval(obj.id+"_exposed=true");
}
else // collapse the list
{
obj.children[0].outerHTML='';
eval(obj.id+"_exposed=false");
}
}
</SCRIPT>
with the things you want to hide/show as:
<DIV ID="xxxx_list"> <---- 1.
thing 1 </BR> thing 2 </BR> .... thing n </BR>
</DIV>
<DIV ID="yyyy_list"> <---- 1.
thing 1 </BR> thing 2 </BR> .... thing n </BR>
</DIV>
<DIV ID="zzzz_list"> <---- 1.
thing 1 </BR> thing 2 </BR> .... thing n </BR>
</DIV>
....
and the collapsed list as:
<H1> LIST </H1>
<UL>
<LI ID="xxxx" ONCLICK="show_details(this)">xxxx</LI>
<LI ID="yyyy" ONCLICK="show_details(this)">yyyy</LI>
<LI ID="zzzz" ONCLICK="show_details(this)">zzzz</LI>
....
</UL>
But to do this with XML and XSL I've come to some problems that forces me to
think in another way, those are:
1. I get an error message in IE5 that says it's not allowed to to put
<xsl:value-of> within an attribute, is this because of the '<' char or is
the whole line forbidden?
2. Here, the script has to have one varable for each item in the list. How
can this be solved in XSL? Could it be done as a vector declaration?
3. There is probably more...
I really would appriciate some help
Thanks
Johan Andreasson
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list