Subject:Displaying output using XML and XSL Author:Atif Sarfraz Date:19 Nov 2001 11:50 AM
Hi,
I am a bit new in this group, and I have a basic question to ask.
I have a sample XML document and its XSL document, and I can see the output of XSL transformation using Stylus Studio. How can I produce the same output in a stand alone Internet Explorer?
I think there is some vbscript that we have to embed in an HTML page, to process XML and XSL at browser end and display its output.
Subject:Re: Displaying output using XML and XSL Author:Minollo I. Date:19 Nov 2001 02:04 PM
Atif,
if I well understand you are trying to perform and see the result of an
XSLT transformation directly from Internet Explorer. If you want to do
that, the easiest thing is to add the following PI to the XML document you
are trying to transform:
(change the curly brackets into angle brackets; unfortunately the Forum
gets confused if I use angle brackets...)
So, your XML document would start with something similar to this:
{?xml version="1.0"?}
{?xml-stylesheet type="text/xsl" href="myxsltfile.xsl"?}
{myrootelement}
...
{/myrootelement}
When you open the XML document from IE, the result of the XSLT
transformation will be displayed (if you are running IE5.5 or later).
Of course there are more complicated things you can do using VB/JScript
from inside an HTML page, and if you are interested in that, I would
suggest that you browse the MSXML documentation on the Microsoft web site.
Subject:Displaying output using XML and XSL Author:Atif Sarfraz Date:19 Nov 2001 07:51 PM
Thanks for the information, as the output came right as I was expecting within the browser.
The only problem remaining is that I am unable to populate the form fields using XSL. The input fields don't show any value, as I am using the following code to display Middle Name in a form field
Whats wrong here, as I am getting the proper output using XMLSpy Plugin and running the above script.
Subject:Re: Displaying output using XML and XSL Author:Minollo I. Date:19 Nov 2001 09:45 PM
Well, I would guess the input fields have an empty value because you are
assigning them an empty value (value="")...
You should change it into something like this: