xml -> xslt -> xhtml, browser-side not rendering, put in pre tags.

B

bram.labarque

Hello all,
The parsing should happen at the browser. I have three files:

1) Initial file: xml with some data and a pointer to an xsl.

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="Test05_Base.xsl"?>
<employee>
<surname>Philips</surname>
<rgn>R</rgn>
</employee>

2) the xsl which in turn reads the xhtml.

<xsl:template match="/">
<xsl:value-of disable-output-escaping="yes"
select="document('Test05_BaseLoggedOff.xhtml')/." />
</xsl:template>

3) the xhtml.

The parsing does take place but the html-elements from the xhtml are
not copied along.
I only see the text which is inside the xhtml. All the text from the
xhtml seems to be put inside a pre tag. I did't put it there.
Btw that pre tag also has a id="transformiixResult" attribute (from
firefox?).
How do i copy the tags from the xhtml along with the text and avoid the
pre tag?

Can somebody help? Thanks a lot.
Greetings, Bram.
 
M

Martin Honnen

2) the xsl which in turn reads the xhtml.

<xsl:template match="/">
<xsl:value-of disable-output-escaping="yes"
select="document('Test05_BaseLoggedOff.xhtml')/." />

Mozilla/Firefox do not support disable-output-escaping="yes", that is
only an optional feature according to the XSLT spec.
The parsing does take place but the html-elements from the xhtml are
not copied along.

xsl:value-of gives you the string value. You might be looking for
xsl:copy-of.
 
B

bram.labarque

Martin said:
Mozilla/Firefox do not support disable-output-escaping="yes", that is
only an optional feature according to the XSLT spec.
Ah ok. I saw somebody mentioning it and just copied it. No better
result.
xsl:value-of gives you the string value. You might be looking for
xsl:copy-of.
I had earlier tried that:
<xsl:template match="/">
<xsl:copy-of select="document('Test05_BaseLoggedOff.xhtml')/." />
</xsl:template>
But it results in the same page, text inside pre tags, no html tags.
Maybe i should use it differently?
Greetings, Bram.
 
M

Martin Honnen

Ah ok. I saw somebody mentioning it and just copied it. No better
result.

No better result? Firefox does not support disable-output-escaping so if
you rely on that you won't get a result.


I had earlier tried that:
<xsl:template match="/">
<xsl:copy-of select="document('Test05_BaseLoggedOff.xhtml')/." />
</xsl:template>
But it results in the same page, text inside pre tags, no html tags.


Here is a simple example that works for me (tested with Firefox 1.5 and
Mozilla 1.7):
<http://home.arcor.de/martin.honnen/xslt/test2006070502.xml>
 

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

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top