Is there a way to apply a default XSLT stylesheet to any XML document received in most browsers?

From: Erik Bruchez <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: best browsers for viewing xml?
Date: Mon, 18 Aug 2003 00:08:03 -0700

Mozilla's XML display is implemented with an XSLT stylesheet as well. You should be able to find it in the Mozilla Bonsai online at www.mozilla.org.

-Erik

Upayavira wrote:
Jay Freeman (saurik) wrote:

One such XSL/T comes with Cocoon: xml2html.xslt . I believe it even supports
+/- expansion, although I remember there being something wrong with it...
like it didn't support namespaces correctly or something and just stripped
them from the output. I'm not quite sure, have only played with it a little.


IE uses an XSLT. A little bit of hunting in there might find it, and you could use that, assuming that you can make a temporary switch to Windows just to find the XSLT to be used for other browsers.

Then you could set up a view that displays stuff transformed:
<map:view name="xml" from-label="xml">
 <map:transform src="ie-xslt.xsl"/>
 <map:serialize type="html"/>
</map:view>

Don't know if that helps.

Regards, Upayavira


Sincerely, Jay Freeman (saurik) [EMAIL PROTECTED]

----- Original Message -----
From: "Conal Tuohy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, August 17, 2003 6:44 PM
Subject: RE: best browsers for viewing xml?


Sonny Sukumar wrote:




I'd like a browser that
can show an XML
document in tree form--preferably clickable.



Consider using an XSLT in Cocoon to transform the XML to an HTML
representation of the XML. I have seen some stylesheets for doing this but
I'm not sure where ... it would be easy to write in any case. Then you can
view it in whatever browser you like.


e.g. something like:


<xsl:template match="/"> <html><body> <xsl:apply-templates/> </body></html> </xsl:template>

<xsl:template match="*">
<p>&lt;<xsl:value-of select="name()"/>
<xsl:apply-templates select="@*"/>
&gt;</p>
</xsl:template>

<xsl:template match="@*">
<xsl:value-of select="name()"/>="<xsl:value-of select="."/>"
</xsl:template>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to