473,387 Members | 1,621 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,387 software developers and data experts.

browser dependent xml?

Hello
I have a situation where i use XML for generating output from a database,
through a perl application, and out to the browsers. Now it seems like
browsers interpret the created xml-files differently.

So, I need a cross-browser way of using xml. Can anyone please direct me to
information about issues with browsers wrt their interpretation of xml.
( For example the KDE browser ( Konqueror ) can embed xml in html while
firefox on windows doesn't do that, leading to browser dependet coding
which is something I want to avoid as long as possible)

some info would be helpful, thank's.
/Greger
--
http://www.gh-webinteractive.com
Jul 20 '05 #1
14 1919
Bob Smith wrote:
Hello
I have a situation where i use XML for generating output from a database,
through a perl application, and out to the browsers. Now it seems like
browsers interpret the created xml-files differently.

So, I need a cross-browser way of using xml. Can anyone please direct me
to information about issues with browsers wrt their interpretation of xml.
( For example the KDE browser ( Konqueror ) can embed xml in html while
I meant the other way around, embed html in xml....sorry for the confusion
firefox on windows doesn't do that, leading to browser dependent coding
which is something I want to avoid as long as possible)

some info would be helpful, thank's.
/Greger


--
http://www.gh-webinteractive.com
Jul 20 '05 #2
In article <cr**********@phys-news1.kolumbus.fi>,
Bob Smith <gr****@gh-webinteractive.com> wrote:
So, I need a cross-browser way of using xml. Can anyone please direct me
to information about issues with browsers wrt their interpretation of xml.
( For example the KDE browser ( Konqueror ) can embed xml in html while


I meant the other way around, embed html in xml....sorry for the confusion
firefox on windows doesn't do that, leading to browser dependent coding
which is something I want to avoid as long as possible)


Firefox allows XHTML to be embedded in generic XML. Does KHTML really
allow tag soup to be embedded in XML?

Anyway, sending instances of your own XML vocabulary over the wire is a
bad idea compared to using a well-known vocabulary like XHTML.

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Jul 20 '05 #3
Henri Sivonen wrote:
In article <cr**********@phys-news1.kolumbus.fi>,
Bob Smith <gr****@gh-webinteractive.com> wrote:
> So, I need a cross-browser way of using xml. Can anyone please direct
> me to information about issues with browsers wrt their interpretation
> of xml. ( For example the KDE browser ( Konqueror ) can embed xml in
> html while
I meant the other way around, embed html in xml....sorry for the
confusion
> firefox on windows doesn't do that, leading to browser dependent coding
> which is something I want to avoid as long as possible)


Firefox allows XHTML to be embedded in generic XML. Does KHTML really
allow tag soup to be embedded in XML?


Konqueror allows for example:
<some_chapter>
<a href="link to somplace">descriptor</a>
</some_chapter>
....
konqueror can render & interpret that, doesn't seem like a good idea.
I'm looking for an XML solution that is completely browser independent.

any suggestions?

for now I output the XML files directly to the browsers. Is it a better
alternative to create the XML files, and hand them over to some templating
system to create visual stuff for the browser?
TIA
/Greger

Anyway, sending instances of your own XML vocabulary over the wire is a
bad idea compared to using a well-known vocabulary like XHTML.


--
http://www.gh-webinteractive.com
Jul 20 '05 #4


Bob Smith wrote:

Konqueror allows for example:
<some_chapter>
<a href="link to somplace">descriptor</a>
</some_chapter>
...
konqueror can render & interpret that, doesn't seem like a good idea.
I'm looking for an XML solution that is completely browser independent.
Well if you use XML and want to have elements in that with HTML
semantics then the proper way is to use XHTML with the defined namespace
e.g.
<some_chapter>
<a xmlns="http://www.w3.org/1999/xhtml" href="whatever">descriptor</a>
</some_chapter>
then browsers like Mozilla or Opera will recognize the <a> element to be
in the XHTML namespace and render it as a link.
Doesn't help with IE however which usually renders XML by transforming
it to HTML with the help of XSLT.
for now I output the XML files directly to the browsers. Is it a better
alternative to create the XML files, and hand them over to some templating
system to create visual stuff for the browser?


Sure, currently it makes much more sense to use XML to store your data
but then to use tools like XSLT on the server to transform the XML to
some well established and supported document type like HTML 4 served as
text/html.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #5
On Sat, 08 Jan 2005 11:27:35 +0100, Bob Smith
<gr****@gh-webinteractive.com> wrote:
So, I need a cross-browser way of using xml.


Use XSLT on the server to turn it into HTML before serving it.
Cross-browser accuracy of HTML rendering is hard enough, for XML you
can just forget it.

Jul 20 '05 #6
Martin Honnen wrote:


Bob Smith wrote:

Konqueror allows for example:
<some_chapter>
<a href="link to somplace">descriptor</a>
</some_chapter>
...
konqueror can render & interpret that, doesn't seem like a good idea.
I'm looking for an XML solution that is completely browser independent.


Well if you use XML and want to have elements in that with HTML
semantics then the proper way is to use XHTML with the defined namespace
e.g.
<some_chapter>
<a xmlns="http://www.w3.org/1999/xhtml" href="whatever">descriptor</a>
</some_chapter>
then browsers like Mozilla or Opera will recognize the <a> element to be
in the XHTML namespace and render it as a link.
Doesn't help with IE however which usually renders XML by transforming
it to HTML with the help of XSLT.
for now I output the XML files directly to the browsers. Is it a better
alternative to create the XML files, and hand them over to some
templating system to create visual stuff for the browser?


Sure, currently it makes much more sense to use XML to store your data
but then to use tools like XSLT on the server to transform the XML to
some well established and supported document type like HTML 4 served as
text/html.

thank you (all) for your input to the discussion.
right, so I am new to both XML and XSLT.
what tools /converters do I need on the server side to do transfer XML with
XSLT to (X)HTML?
( using linux S.u.S.E. )
best r
Greger

--
http://www.gh-webinteractive.com
Jul 20 '05 #7


Bob Smith wrote:

what tools /converters do I need on the server side to do transfer XML with
XSLT to (X)HTML?
( using linux S.u.S.E. )


It (partly) depends on what you are using on the server, e.g. Java
(where 1.4 and 1.5 have an XSLT 1.0 processor included), or PHP (where
PHP 4 has an extension that uses Sablotron I think and PHP 5 uses
libxslt) or Perl (which I think can use different XSLT processors
written in C or C++ if wrappers are provided).
One URL to start with if you are using Apache could be
<http://xml.apache.org/>
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #8
In article <41***********************@newsread4.arcor-online.net>,
Martin Honnen <ma*******@yahoo.de> wrote:
Bob Smith wrote:

what tools /converters do I need on the server side to do transfer XML with
XSLT to (X)HTML?
( using linux S.u.S.E. )


It (partly) depends on what you are using on the server, e.g. Java
(where 1.4 and 1.5 have an XSLT 1.0 processor included)


XSLT transformation to XHTML does not guarantee Appendix C
compatibility. To go from XHTML to HTML in Java, you could use a SAX
serializer like this:
http://iki.fi/hsivonen/cms/src/fi/ik...erializer.java

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Jul 20 '05 #9


Henri Sivonen wrote:

XSLT transformation to XHTML does not guarantee Appendix C
compatibility. To go from XHTML to HTML in Java, you could use a SAX
serializer like this:
http://iki.fi/hsivonen/cms/src/fi/ik...erializer.java


But that creates HTML 4.01 so it doesn't help with getting "XHTML
Appendix C compatibility", or does it?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #10
In article <41***********************@newsread4.arcor-online.net>,
Martin Honnen <ma*******@yahoo.de> wrote:
Henri Sivonen wrote:

XSLT transformation to XHTML does not guarantee Appendix C
compatibility. To go from XHTML to HTML in Java, you could use a SAX
serializer like this:
http://iki.fi/hsivonen/cms/src/fi/ik...erializer.java


But that creates HTML 4.01 so it doesn't help with getting "XHTML
Appendix C compatibility", or does it?


No, but it helps with getting something that is appropriate for serving
as text/html.

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Jul 20 '05 #11
In article <hs****************************@news.dnainternet.n et>,
Henri Sivonen <hs******@iki.fi> writes:
> what tools /converters do I need on the server side to do transfer XML with
> XSLT to (X)HTML?
> ( using linux S.u.S.E. )


It (partly) depends on what you are using on the server, e.g. Java
(where 1.4 and 1.5 have an XSLT 1.0 processor included)


XSLT transformation to XHTML does not guarantee Appendix C
compatibility.


If web browsers are your concern, XSLT can generate (X-less) HTML.

If for any reason you need to stick with XHTML and ensure Appendix-C
compliance, use mod_xhtml.

--
Nick Kew
Jul 20 '05 #12
In article <4d************@hugin.webthing.com>,
ni**@hugin.webthing.com (Nick Kew) wrote:
If web browsers are your concern, XSLT can generate (X-less) HTML.


But then if you want to add the X, you need changes to the
transformation, right? That's why I'd rather write the transformation to
target XHTML, take SAX output from the XSLT engine and use a SAX to HTML
serializer.

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Jul 20 '05 #13
Bob Smith wrote:
what tools /converters do I need on the server side to do transfer XML
with XSLT to (X)HTML?
( using linux S.u.S.E. )


It depends if you want to do a static transformation and have Apache serve
the resulting HTML from disk in the normal way, or have the transformation
done in real time afresh every time the document changes (ie static docs or
fast-changing docs), or if the XML document is itself dynamically generated
(eg from a database or data stream or feed).

For traditional text documents (slow changing, if ever), I use Saxon. With
one or two trivially small exceptions it has been massively reliable.

I have tried AxKit (freebie for Perl and Apache) and I got it to work once,
but the authors don't have access to recent versions of operating systems,
so I haven't been able to get it running under RH9 or FC3 yet. Maybe it
works with SuSE. It's a small, light, realtime XML-XSLT server driver.

For dynamic configurations I prefer Cocoon, but there are performance
limitations (like most Java server applications, Cocoon with Tomcat
tends to spawn processes like tadpoles on a warm summer morning, and
some of them are persistent little buggers).

For higher performance, you may want to look at a commercial solution
like PropelX (www.propylon.com) or Omnimark (www.stilo.com), or at
writing some C or Java or JSP or ASP or whatever scripting solution
you prefer.

///Peter
[Claimer: I have a business relationship with Propylon]
--
"The cat in the box is both a wave and a particle"
-- Terry Pratchett, introducing quantum physics in _The Authentic Cat_
Jul 20 '05 #14
In article <34*************@individual.net>,
Peter Flynn <pe*********@m.silmaril.ie> writes:
Bob Smith wrote:
what tools /converters do I need on the server side to do transfer XML
with XSLT to (X)HTML?
( using linux S.u.S.E. )
It depends if you want to do a static transformation and have Apache serve
the resulting HTML from disk in the normal way,


The effecient way where feasible, of course.
or have the transformation
done in real time afresh every time the document changes (ie static docs or
fast-changing docs), or if the XML document is itself dynamically generated
(eg from a database or data stream or feed).


Unless you're using a non-apache server, the best solution is then an XSLT
filter module[1] like mod_transform[2] from www.outoforder.cc.

[1] There are also several modules called mod_xslt. I've used two;
one worked well, the other was a total nonstarter. YMMV.
[2] Of which I am co-developer, and which I've been using since 2002.

--
Nick Kew
Jul 20 '05 #15

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

Similar topics

7
by: ~John Hemans~ | last post by:
Hi, I'm using a popup window to show a series of pages. On the last page, I need to close the window using a graphical button, return to the main browser, and go to a new url. I saw a posting on...
13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
25
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a...
7
by: phal | last post by:
Hi I think there are many different browsers to browse to the Internet, how can I write the javascript to identify different browser and display according to the users. Some browser disable the...
4
by: KoRnDragon | last post by:
I'm using a script to detect which browser is using in order to include the correct stylesheet but on this one page (http://korndragon.com/ffa5.php) It thinks I'm using Internet Explorer when I'm...
27
by: David Golightly | last post by:
This is just a quick poll for all you web devs out there: What browsers do you test on/are concerned about compatibility with? Obviously, you're going to test on current-generation browsers such...
5
by: ryushinyama | last post by:
I have a new menus using javascript, there is a conflict with it and another javascript code that causes IE 6 (and probably later versions) to blink as you roll through it. It works fine in FF and...
4
by: Nuno | last post by:
Hello, I'm trying to call some web services only using javascript from a html page. I succeeded on doind this in IE with the use of the behavior:url(webservice.htc); (technique founded in the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.