I repurposed :-) the Microsoft xml-xslt viewer script to create an HTML page that
serves as a wrapper to swap out multiple xsl files on the same source.
http://ourworld.compuserve.com/homepages/BWMerkey/xml/index.htm
A good learning project - but clumsy.
1) The swap seems to require the download of the complete file for each
transformation. Definite no-no in the modem world.
2) CSS styling of the HTML result tree has to be done inline. Embedded and external
CSS is somehow killed by the scripting.
It seems that there should be a more elegant implementation of this idea somewhere.
Ultimately, I am not concerned with showing the source. I just want a way to
efficiently show different results from the same source.
--Brett
Michel
Brett Merkey <brett_...@tvratings.com> wrote in message
news:#oc$2UTr$GA....@cppssbbsa02.microsoft.com...
Michel Hendriksen <mic...@kensas.nl> wrote in message
news:8em8t9$f98$1...@porthos.nl.uu.net...
<HTML>
</HEAD>
<BODY>
<XML id="data" src="data.xml"></XML>
<XML id="style1" src="some_style1.xsl"></XML>
<XML id="style2" src="some_style2.xsl"></XML>
<div id="result">
</div>
<!-- MAKE SOME BUTTONS -->
<script language="JScript">
function OnButton1( )
{
document.all( "result" ).innerHTML = Transform( "data", "style1" );
}
function OnButton1( )
{
document.all( "result" ).innerHTML = Transform( "data", "style2" );
}
function TransformSelection( XMLsrc, XSLsrc )
{
xmlDoc = document.all( XMLsrc );
xslDoc = document.all( XSLsrc );
xmlRoot = xmlDoc.documentElement;
xslRoot = xslDoc.documentElement;
result_text = xmlRoot.transformNode( xslRoot );
return result_text;
}
</script>
</BODY>
</HTML>
I did not test this, but it would be something like this.
Michel
Bill DuBay <bill_...@phoenix.com> wrote in message
news:sh3o3uk...@corp.supernews.com...
Thanks! Your script worked fine. This will give me an excellent alternative way to
display xsl transformations.
Brett