LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-29-2011, 07:04 PM   #1
hydraMax
Member
 
Registered: Jul 2010
Location: Skynet
Distribution: Debian + Emacs
Posts: 467
Blog Entries: 60

Rep: Reputation: 51
embedded XML


I read that it was possible to embed XML in an HTML document with a tag set like so:

Code:
<xml src="test.xml"></xml>
I thought this was the coolest thing, because then I could define content in separate XML documents (articles, etc.), embed them, and then attach CSS to them (which I read was also possible).

But then I get the disappointing news that this only works in Internet Explorer. (?!) And the recommended workaround is to use JavaScript to do the same thing. (reference) However, the idea of having this kind of content dependent on and provided by JavaScript is utterly lame.

Is that just "the way it is"? Or is there something I'm overlooking here?

Last edited by hydraMax; 12-29-2011 at 07:05 PM. Reason: typo
 
Old 12-30-2011, 04:09 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
There is no <xml> tag in the HTML or XHTML specifications. It may be that Internet Explorer decided to implement one. But granted that most of your audience is unlikely to be using Internet Explorer, it might not be of much relevance.

Styling XML into HTML via XSLT is possible, but it almost surely overkill for most simple practical applications. PHP provides simplistic methods to include content stubs. Have you looked at that?
 
Old 12-30-2011, 05:40 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by jhwilliams View Post
Styling XML into HTML via XSLT is possible, but it almost surely overkill for most simple practical applications. PHP provides simplistic methods to include content stubs. Have you looked at that?
And if you want to do your HTML generation client-side, it would be much better to use a Javascript templating framework such as jquery-templates, Mustache, or Google closure templates.

I can guarantee you that the embedded-xml/XSLT thing you're talking about is never done.

Last edited by dugan; 12-30-2011 at 05:44 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is *libqt4-xml* equivalent of *libxml2* with respect to *XML* parsing ? Aquarius_Girl Linux - Software 1 11-25-2010 07:34 PM
no xml, convert tvtime stationlist to xml for mythtv/freevo... frenchn00b Linux - General 8 11-03-2007 11:35 PM
LXer: StAX’ing up XML: Streaming API for XML LXer Syndicated Linux News 0 11-30-2006 07:54 AM
configure: error: could not find DocBook XML DTD V4.1.2 in XML catalog Fadoksi Linux - Software 1 07-16-2006 06:41 AM
experiences with embedded mysql? XML instead of a database? SerfurJ Programming 2 12-11-2004 08:06 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration