Subject: Re: [xsl] collapsable / expandable tree in XSL From: Mael Guillemot <Mael.Guillemot@xxxxxxxx> Date: Wed, 12 Mar 2003 16:23:12 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] collapsable / expandable , Jarno . Elovirta | Thread | RE: [xsl] collapsable / expandable , David . Pawson |
AW: [xsl] 2 XML source, David Alcantara | Date | RE: [xsl] dynamic XPath?, Rod Humphris - FLPTN |
Month |