RE: [xsl] Any samples of client-side XSLT to generate webpages?

Subject: RE: [xsl] Any samples of client-side XSLT to generate webpages?
From: "Daniel Joshua" <daniel.joshua@xxxxxxxxxxxx>
Date: Wed, 28 Jul 2004 13:11:27 +0800
Thanks for your reply.

>-----Original Message-----
>From: David Carlisle [mailto:davidc@xxxxxxxxx]
>Sent: Tuesday, 27 July, 2004 11:49 PM
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject: Re: [xsl] Any samples of client-side XSLT to generate webpages?
>  (2)
>  - works in Mozilla - currently need to manually add the
>  but I might automate this later
>  - nothing visible (except background graphic) in IE
>well this one is the easier of the two, probably
>this one is an XHTML document served as text/html (no client side xslt)
>so it will be handled by mozilla and IEs _HTML_ parser as such, things
>like <td class="box_right"/> <br/> etc
>(any instance of /> ) are all syntax errors and so whatever the browser
>does is just dependent on its error recovery, so its not surprising if
>you get differing effects.
>If you are generating html on the server, make sure your XSLT at that
>end is generating _html_ (it will do this automatically if the top level
>element is <html> in no-namespace).

Should I change the content type to "application/xhtml+xml"? I was told
that this is not fully supported by browsers.

I would like to keep it as XHTML. This is why I keep the 'method="xml"'
in my XSLT stylesheet.

  <xsl:output method="xml" version="1.0" encoding="iso-8859-1"
   indent="no" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"


How do most people diplay XHTML (in a IE and Mozilla compliant style)?

>  - works in IE
>  - unable to submit form in Mozilla
>This one is a bit harder It's served as text/xml (application/xml is
>better) and claims to be (and is) utf-8 in its xml declaration.
>the trouble is (I think, couldn't really check from here), after the
>client side transform it's whatever encoding it's in after the transform
>I understand that browsers are a little variable in what encoding they
>use to return form data in these situations. When you say unable to
>submit form in Mozilla do you mean that you don't get back the login
>info that you expected or that you get nothing back, it may be worth
>looking if you get data back in an unexpected encoding.

I will change my content type to "application/xml", thanks!

I said it was unable to submit a form in Mozilla, because
'document.submitForm' was undefined eventhough in the transformation
output '<form name="submitForm" ...>" existed.

Maybe XHTML does not support 'document.[form name]', dunno?

Workaround suggested by Manos was to give my form an 'id="submitForm"'
and use DOM to access it by "document.getElementById('submitForm')".
This works.



Current Thread