Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > browser dependent xml?

Reply
Thread Tools

browser dependent xml?

 
 
Henri Sivonen
Guest
Posts: n/a
 
      01-08-2005
In article <cro8mu$37r$(E-Mail Removed)>,
Bob Smith <(E-Mail Removed)> 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
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://iki.fi/hsivonen/
 
Reply With Quote
 
 
 
 
Bob Smith
Guest
Posts: n/a
 
      01-08-2005
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
 
Reply With Quote
 
 
 
 
Bob Smith
Guest
Posts: n/a
 
      01-08-2005
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
 
Reply With Quote
 
Bob Smith
Guest
Posts: n/a
 
      01-08-2005
Henri Sivonen wrote:

> In article <cro8mu$37r$(E-Mail Removed)>,
> Bob Smith <(E-Mail Removed)> 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
 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      01-08-2005


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/
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      01-08-2005
On Sat, 08 Jan 2005 11:27:35 +0100, Bob Smith
<(E-Mail Removed)> 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.

 
Reply With Quote
 
Bob Smith
Guest
Posts: n/a
 
      01-09-2005
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
 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      01-09-2005


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/
 
Reply With Quote
 
Henri Sivonen
Guest
Posts: n/a
 
      01-09-2005
In article <41e11ef6$0$17052$(E-Mail Removed)-online.net>,
Martin Honnen <(E-Mail Removed)> 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
(E-Mail Removed)
http://iki.fi/hsivonen/
 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      01-09-2005


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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
non-dependent vs. dependent template names puzzlecracker C++ 1 08-07-2008 07:42 AM
browser-dependent cookie behavior rallabs@adelphia.net Perl Misc 4 09-02-2006 02:38 AM
Why Browser Dependent For Trend Micro's PC-Cillin Virus Protection Software ? Robert11 Computer Support 2 01-08-2005 09:56 PM
defining a flag-dependent constant valentin tihomirov VHDL 3 11-28-2004 04:15 AM
A selection changes on asp page with 6 dependent list boxes, when back Galina ASP .Net 8 02-03-2004 04:12 PM



Advertisments