473,473 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

produce xml documents with python, and display it with xsl in a internet browser

Hi,
like a lot of other newbies in xml i suffer from the various ways you
can take for xml data processing in python. Here are my two major
problems:
Problem number one:
A application written in python remote controls (demands actions) a HIL
(Hardware in the loop) test stand and evaluate its actions (system
reactions on the demand ) afterwards. The application puts all the
results in a word protocol during the test. Now i would like to do the
next step and represent the results in a proper data type document (xml
- separate style from reference data). That means for python that it
is in charge of provideing the necessary reference data for new xml
documents and maybe more (changing xsl sheets if new test data elements
were defined)?!?. I am not quite sure if it is better to specify a kind
of source/basic xml document with all the >elements< and >attributes<
according to the defined test results. In that case python has to
modify the xml template with the new test results and save it as a new
xml document (to keep the base template unchanged fort he next test). I
suppose python could do the job with the help of DOM/SAX. I learned
from reports in certain forums that it is also possible to use simply
print statements. Does that mean i just have to do ordinary file
handling? For example:

f.open ("xml_file.xml", w)
f.write ("<?xml version='1.0' encoding='ISO-8859-1'?>")
f.write ("<!DOCTYPE fahrplan SYSTEM ,NachweisMetaDaten.dtd'">)
f.write ("<?xml-stylesheet type='text/xsl'
href='nachweismetadaten.xsl' ?>")
f.write ("<meta_data>")
f.write ("<section>")
..
..
..
f.close()

If it works in the ordinary way what is the advantage and what is the
disadvantage? Will I run in trouble if it comes to the transformation
of tabs, and other xml related symbols. I guess with the file method
i can create new elements and attributes in the python process/code
without taking care of the basic xml template. Maybe it is also
important to mention that i do not have the intention to process the
test data in python after the test again. I would like to give the
end-user (function developer in our lab) the possibility to check out
the test data results with a internet browser and here is my second
problem:
To accomplish this i made a base xsl file which includes Buttons to
give the end-user the possibility to call different xml templates (sort
of clicking through the xml tree/displaying data result fragments). The
trouble is that as far as i know the button feature ,,onclick" does
not allow to call ,,xml:temlpates" just javascript functions. Is it
just possible to use javascript functions with DOM methods if i would
like to use buttons in html to extend and reduce displaying data from a
xml document? If this is the case then the xml:template functions in
xsl are useless, isn't it. I am quite sure that is not the case!
Sorry that i have so many stupid questions but a fool with a tool is
still a fool.
Anyway! Many, many thanks for the slightest help.

wyatt

May 2 '06 #1
0 1242

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

Similar topics

6
by: matthiasjanes | last post by:
Dear everyone, I would like to know what would be the smalles possible WebBrowser for displaying Python CGI application. I developed a few small application with an WebInterface. The...
4
by: Luca | last post by:
Hello Everybody, I'm a 26 years old Italian "Florentine" Computer technician :) I'm writing you about an idea that I've got of a function that could be introduced in new web browsers (or even...
4
by: WGW | last post by:
I would like to automate some simple browser navigating using python. Ideally, I would like a package like pyexpect, but that can handle a browser in much the same way as pyexpect handles a...
3
by: Jennie | last post by:
I am looking for a way to make the web page have a formfeed so the info from that spot will go to the top of the next printed page when I file>print the web page. I want it not to break on the...
0
by: Jon Monteleone | last post by:
Greetings, I posted a few days back and didnt get much of a response, so I figured I would post again with more detail. I am running gnome under fedora core 4. I want a kid to be able to drop a...
47
by: Kenneth McDonald | last post by:
Is there any emerging consensus on the "best" UI for toolkit. Tk never quite made it but from what I can see, both qt and wxWin are both doing fairly well in general. I'm already aware of the...
9
by: Thomas Scheiderich | last post by:
I am getting ready to look at putting our users manual and employee handbook on our intranet and was curious how others do it? We have it already set up as Word documents and am looking at...
3
by: defcon8 | last post by:
How can I print html documents in Python on Windows?
9
by: -Lost | last post by:
In Firefox and Safari for example, if I serve my XHTML documents as application/xml or xhtml+xml they only display the top inch or so of the document. In Opera it says "object has been blocked."...
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
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
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...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.