|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] pushing XML to a javascript pop-up window
Hey everyone, I have a rather interesting problem that I am having trouble solving. I have a large XML file that is being parsed into an HTML file. I have it almost finished except for one last obstacle. In the XML document structure is similar to a book, and when you click on a link (say, copyright info) it opens up a pop-up window that displays the information (stylized of course)). Now, I can suppress the information in the master document and create a link easily, but how do I push the information into the new window? I have tried a few different things, but to no avail. Everything I have tried has been inserting javascript into the head of the html document through the XSL and then doing one of the two: <SCRIPT language="javascript"> <xsl:text disable-output-escaping="yes"> function legalinfo() { OpenWindow=window.open("", "newwin"); OpenWindow.document.write('</xsl:text> <xsl:apply-templates select="Test1" /> <xsl:text>')</xsl:text> <xsl:call-template name="Test2" /> OpenWindow.document.close() self.name="main" } </xsl:text> </SCRIPT> Here's what Test1 looks like: <xsl:template match="Test1"> <xsl:text><div class="Smalltext"></xsl:text> <xsl:apply-templates/> <xsl:text disable-output-escaping="yes"> OpenWindow.document.write('</div>') </xsl:text> </xsl:template> which works up until the <xsl:apply-templates /> line. Test2 will work nicely except that I have to know what elements to call, and that doesn't work because this XSL has to be generic enough to handle any book of this format, so the problem comes in when you have to display a numbered-list in one document but not in the next, blah blah blah. Any ideas on how I can accomplish this? As it stands right now, I can't call the XMLDOM because I get an error that the XML document has a top-level element not specified in the DTD. However I can't change the DTD... Bryan __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com 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
|






