This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@coremedia-ag.com - 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]