[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: collapsable / expandable tree in XSL

Subject: Re: collapsable / expandable tree in XSL
From: Mael Guillemot <Mael.Guillemot@xxxxxxxx>
Date: Wed, 12 Mar 2003 16:23:12 +0100
javascript expandable tree
Hi,

I will soon install a command-line XSLT processor (xalan-java) and I thank Jarno for his hints.
I reformulate my problem (note that I use Mozilla and not I.E. msxml):

1) Here is a starting point where I use XSL to transform an XML file describing the content of a video (it could be anything else).

http://www.idiap.ch/~guillemo/VideoBrowser/XSLTsolution/videosegTEST.xml

2) Now, I want to make a dynamic page (still with XSL) with a simple collapsable / expandable tool (the idea in static html: http://www.idiap.ch/~guillemo/VideoBrowser/clip.html ).

A good solution I found is to include javascript such as:  http://www.dansteinman.com/dynduo/en/collapsemenu.html  (simple example in collapsemenu1.html )

3) So far, I can't handle the same in XSL because of a <DIV> tag which does not finish (in the original HTML code, the author says that the javascript object will complete all the </div>'s on it's own ).

Thus, I have to find a way to create this element in the DOM: <div id="CollapseMenu0Block0"> without ending it.

I tried a lot of combinations but it still does not process the javascript:
i.e.
    <xsl:element name="div">
    <xsl:attribute name="id">CollapseMenu0Block1</xsl:attribute>
    </xsl:element>

Does anybody know a simple way to do a collapsable / expandable tree with XSL if this one cannot perform it? Using xerces parser function called by a CGI but it's a lot more code!! : )

Cheers,

Maël

---
http://www.idiap.ch/~guillemo/


Jarno.Elovirta@xxxxxxxxx wrote:

> Hi,
>
> > One good thing is that it does not print it anymore. But it
> > still does not process it to render the collapsable /
> > expandable javascript tree.
> >
> > ex:
> > http://www.idiap.ch/~guillemo/JAVASCRIPT/dynapi/docs/examples/
> > TEST2.xml with the sylesheet named Testdiv.xsl (in the same
> > directory).
> > while OK in html:
> > http://www.idiap.ch/~guillemo/JAVASCRIPT/dynapi/docs/examples/
> > collapsemenu1.html
>
> Your stylesheet is a combination of a normal XSLT stylesheet and simplified syntax <http://www.w3.org/TR/xslt#result-element-stylesheet>, i.e. broken. Remove xsl:output and xsl:template instructions, they're not allowed in simplified syntax stylesheets.
>
> You should install a command-line XSLT processor and try to run the transformation from the command-line, easier for development. When you get it to work on command-line, it (the transformation) will work on the browsers, too.
>
> Cheers,
>
> Jarno - SITD: Snuff Machinery (9mm RMX by A. Deal & T. Schmidt)
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.