473,397 Members | 2,056 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,397 software developers and data experts.

embedding XML in HTML

I have an XML data type which I would like to display in my HTML.
The data type looks somthing like this:

<package name="helloworld">
<description>
This is a program which prints hello world to a terminal.
</description>
<file uri="hellos.zip" name="source code" size="100bytes"/>
<file uri="hellob.zip" name="binaries" size="300bytes"/>
<package>

I would like to embed these <packages> at various location in my
formatted text (html). Then use XSLT's to do the transforms.

I have used XSLT's which XML only documents before, but I am not sure
how to get started doing it in a mixed mode file.

What is the simplest way to acomplish this.

~S
Jul 20 '05 #1
1 2508


shea wrote:
I have an XML data type which I would like to display in my HTML.
The data type looks somthing like this:

<package name="helloworld">
<description>
This is a program which prints hello world to a terminal.
</description>
<file uri="hellos.zip" name="source code" size="100bytes"/>
<file uri="hellob.zip" name="binaries" size="300bytes"/>
<package>

I would like to embed these <packages> at various location in my
formatted text (html). Then use XSLT's to do the transforms.

I have used XSLT's which XML only documents before, but I am not sure
how to get started doing it in a mixed mode file.

What is the simplest way to acomplish this.


Well, in theory the proper way to mix your XML data markup with your
HTML document markup is to use XHTML and then embed your XML data in a
separate namespace. Then you can write an XSLT transformation which is
namespace aware and does an identity transformation on the elements in
the XHTML namespace and transforms your XML data to the XHTML markup you
want the data rendered with.
In practice you might encounter problems if you can't use XHTML instead
of HTML as your input and you might encounter problems with XHTML output
as browsers like IE are not yet up to deal with real XHTML. But the last
problem is easily solved with XSLT as that also allows you to transform
XHTML to plain HTML so that is not such a big deal.
What remains is your HTML input and whether you want/can transform that
to XHTML. Tidy is a tool that can help with that.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

0
by: Atul Kshirsagar | last post by:
I am embedding python in my C++ application. I am using Python *2.3.2* with a C++ extention DLL in multi-threaded environment. I am using SWIG-1.3.19 to generate C++ to Python interface. Now to...
4
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been...
2
by: Roose | last post by:
With some googling I have found these resources: http://docs.python.org/ext/win-dlls.html http://www.python.org/doc/faq/windows.html I have a large Win32/MFC/C/C++ application that has an...
8
by: Alan Lue | last post by:
Hi, I'm trying to set up a webpage so that I can view multiple HTML files from the same page. For example, you might go to http://example.com/lab_tests.html and be able to view lab1.html,...
2
by: John Dean | last post by:
Hi Could somebody, please tell me where I can find information about embedding Python into a C/C++ application. The example in the docs is rather simple. I am looking for something a bit more...
13
by: John Salerno | last post by:
I'm hoping someone can give me the basics for how to do very simple things with Python scripts from within my HTML. For example, I know that I can do this in PHP: <h1>Here is a header</h1>...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
3
by: Ollie Riches | last post by:
How do I embed a *.flv file (Flash Video) into an aspx page similar to embedding windows media player active x control? Cheers Ollie Riches
4
by: David Abrahams | last post by:
I'm seeing highly surprising (and different!) behaviors of PyImport_ImportModule on Linux and Windows when used in a program with python embedding. On Linux, when attempting to import a module...
2
by: John Grandy | last post by:
I am not having success embedding carriage return and line feed characters into a string and displaying them with an ASP.NET label. Is anyone getting either of the following to work ? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.