OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
using Javascript in XSL-XML

my XML file "p1.xml" looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="ss1.xsl"?>
some text

even some more text

with the XSL "ss1.xsl" like this:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
	<xsl:template match="/">
#s1 {
border:1px solid #ccc;
		<script type="text/javascript">

function sm(obj) {

	var el = document.getElementById(obj);

	if ( el.style.display != "none" ) {

		el.style.display = 'none';


	else {

		el.style.display = ' ';



		<TABLE STYLE="border:1px solid black">
				<b>title goes here</b>
				<TD>group 1 <img src="images\plus.gif" onclick="sm('s11')"/>
				<DIV id="s11">
						<xsl:copy-of select="document('p1.xml')//f1/s1/."/>

And I want XSL to use this bit of Javascript to collapse/expande or hide/show
this <TD><DIV> cell of table.

but it does not work properly. Can anyone advise me, what to improve in order
for XSL to understand this function.

Thank you very much for your advice.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS