XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Atif SarfrazSubject: 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.

Can someone give me a clue?

Regards,

Atif Sarfraz

Postnext
Minollo I.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:

{?xml-stylesheet type="text/xsl" href="myxsltfile.xsl"?}

(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.

Hope this helps,
Minollo



Whats wrong here, as I am getting the proper output using XMLSpy Plugin and running the above script.

Postnext
Atif SarfrazSubject: 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









Postnext
Atif SarfrazSubject: Displaying output using XML and XSL
Author: Atif Sarfraz
Date: 19 Nov 2001 07:53 PM
Sorry as the code I pasted wasn't visible due to tags. Here it is again with braces

{td}
{xsl:for-each select="MORTGAGEDATA"}
{xsl:for-each select="BORROWER"}
{xsl:for-each select="MiddleName"}
{input value=""/}
{/xsl:for-each}
{/xsl:for-each}
{/xsl:for-each}
{/td}

Postnext
Minollo I.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:

{td}
{xsl:for-each select="MORTGAGEDATA"}
{xsl:for-each select="BORROWER"}
{xsl:for-each select="MiddleName"}
{input}
{xsl:attribute name="value"}{xsl:value-of select="."/}{/xsl:attribute}
{/input}
{/xsl:for-each}
{/xsl:for-each}
{/xsl:for-each}
{/td}

Hope this helps,
Minollo

Posttop
Atif SarfrazSubject: Re: Displaying output using XML and XSL
Author: Atif Sarfraz
Date: 20 Nov 2001 12:32 PM
Cool! Its working great.

Thanks for the help.

Regards,

Atif

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.