[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Output to Frames using XSL
Charles Cantrell wrote: [snip] > However, that response does not quite address the situation I am attempting > to create. (At least, I hope it does not.) The content of the frame is not > in the the same document that is defining the frame. The content comes from > an XML file that specifies the stylesheet. The frameset definition is in the > stylesheet. > > What I am trying to figure out is how to make refererence to the content in > the XML document from the "src" attribute of the frame element contained in > the stylesheet. > > In other words, I want the stylesheet to transform the XML tags in the > content document to the HTML that would otherwise be the content of a > "hardcoded" file reference in the "src" attribute. [snip] Try using JavaScript. It'll make your Stylesheet ugly but it works: <xsl:template match="input"> <html><head><title>Folder <xsl:value-of select="@name"/></title> <SCRIPT LANGUAGE="JavaScript"> function aframe() { return "<html><body bgcolor='white'>Insert your stuff here</body></html>"; } </SCRIPT> <FRAMESET cols="25%,75%" rows="15%,90%" border="1"> <FRAME name="treeview" src="javascript:parent.aframe()"/> <FRAME name="docview" src="javascript:parent.aframe()"> </FRAMESET> </html> </xsl:template> > It seems like this ought to be something fairly normal to want to do. Exactly. You could also write a Script that uses two Stylesheets to produce two different representations of your content. Regards, Daniel Hinz -- Daniel Hinz - Entwickler daniel.hinz@xxxxxxxxxxxxxxxx - fon +49.40.325587.205 fax .199 CoreMedia AG - www.coremedia-ag.com Düsternstraße 3, 20355 Hamburg, Germany XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|