comparing DOM/XSLT with Safari/Firefox

U

Une Bévue

I'm trying a transfor xml -> (x)html by two ways
:

- classic using DOM (appendChild and the like...)
- less classic by XSLT

the moke-up are within the pages :

<http://thoraval.yvon.free.fr/AB2Html_sam/index.xhtml> "DOM"
<http://thoraval.yvon.free.fr/AB2Html_sam/index_xslt.xhtml> "XSLT"

the "DOM" version gives same result on Safari or Firefox.

at the contrary even if the "XSLT" version the same result than the
"DOM" version with Safari, it isn't the same with Firefox :
- the img doesn't shows-up, as if the src isn't loaded (???)
- the résult doesn't conform to the css styles ...

do you have some light about this kind of prob ???

I'd like better using the "XSLT" verion (easier to read ans maintain).
 
P

pr

Une said:
I'm trying a transfor xml -> (x)html by two ways
:

- classic using DOM (appendChild and the like...)
- less classic by XSLT

the moke-up are within the pages :

<http://thoraval.yvon.free.fr/AB2Html_sam/index.xhtml> "DOM"
<http://thoraval.yvon.free.fr/AB2Html_sam/index_xslt.xhtml> "XSLT"

the "DOM" version gives same result on Safari or Firefox.

at the contrary even if the "XSLT" version the same result than the
"DOM" version with Safari, it isn't the same with Firefox :
- the img doesn't shows-up, as if the src isn't loaded (???)
- the résult doesn't conform to the css styles ...

do you have some light about this kind of prob ???

It looks to me like you omitted the XHTML namespace in preview.xsl, and
Firefox therefore regards the result as generic XML, which it displays
with minimal formatting. Try:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
I'd like better using the "XSLT" verion (easier to read ans maintain).

Agreed. Nice to see it in action.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top