473,322 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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.

Jul 5 '06 #1
5 2780


br***********@gmail.com wrote:

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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 5 '06 #2

Martin Honnen wrote:
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.
>
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.
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.

Jul 5 '06 #3


br***********@gmail.com wrote:
Martin Honnen wrote:
>>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.
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>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 5 '06 #4

Martin Honnen wrote:
>
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>
It indeed works nice. There are several differences, i'll have a better
look at at it tomorrow. Btw it also works on MSIE.
Thank you very much.
Greetings, Bram.

Jul 5 '06 #5

Martin Honnen wrote:
br***********@gmail.com wrote:
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>
Hello Martin,

The error was in my xsl: i had written <xsl:output method="text" />
instead of <xsl:output method="xml" />.

Thanks again.
Greetings, Bram.

Jul 6 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: john | last post by:
Hi I am devlopeing a data centric intranetsite with data in mysql database I would like your opinion on this architecture Data will be fetched from database by python & converted into xml The...
5
by: Greg | last post by:
Hi everybody, so, I would like to use XML files for some parts of my website. I would like to respect W3C XHTML 1.1 recommendation. Then, I have these two docs : o My XML file: <?xml...
1
by: Sven Steinacker | last post by:
Hi, XSLT files generated by Microsoft InfoPath applied to an applicable XML file produces quite decent HTML presentations. At least with Mozilla and, of course, IE 6.0 the results look the same...
2
by: Peter David | last post by:
Hi all, 1) I have created a huge XML "data base" consisting of people with <name>Charlie</name> <address>High street></address> etc. I wanna use this xml-data base for various HTM-pages for me...
2
by: full_philNO | last post by:
Hi all, I have a problem with the img tag. It simply doesn't want to translate into a img XHTML tag. When I write in XSLT : <img src="..." alt="..." ..../> or <img src=".." alt="..."...
8
by: David Dorward | last post by:
I'm looking for an XSLT that I can use to transform XHTML 1.0 Strict into HTML 4.01. Does anyone know of a nice prewritten one? -- David Dorward ...
0
by: bram.labarque | last post by:
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"?>...
0
by: elsheh | last post by:
Hi….. Everyone I’m using xslt to convert my XML doc. into xhtml. When I use IE or Mozilla browsers to display xhtml doc., the result is fine. However, using X_Smiles result in <br> loses its...
7
by: elsheh | last post by:
Hi 2 all I’m using XSLT to transform XML document into XHTML doc. Xhtml form’s elements need to be validated. Any idea tells how to link javaScripts functions with xhtml form’s elements. any help...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.