So, you've got the XML like -
<descript> You are standing in front of a stump. A path leads north. </descript> <exits> N </exits> and you have a XSL that works like a CSS? descript {font:arial, align:center} exits style:bolder Is that a good paraphrasing? How browser dependent would that be? Do most browsers support XML & XSL? PS What's SAX DOM? I know what a DOM is, but what's the SAX? I saw it in my Python docs when I was poking XMLParser. If/when I work with XML, would you recommend Python's standard modules for it? Regards, Liam Clarke On Tue, 11 Jan 2005 23:34:30 +0000, Max Noel <[EMAIL PROTECTED]> wrote: > (yes, forgot to CC the list again -- argh!) > > Begin forwarded message: > > > From: Max Noel <[EMAIL PROTECTED]> > > Date: January 11, 2005 23:33:44 GMT > > To: Liam Clarke <[EMAIL PROTECTED]> > > Subject: Re: [Tutor] More and more OT - Python/Java > > > > > > On Jan 11, 2005, at 23:15, Liam Clarke wrote: > > > >> Out of curiousity, having poked around XML while learning about the > >> JScript DOM, what are you using it for? > >> > >> AFAIK, you make up your own tags, and then parse them and display > >> them, and anyone else could create data using your tags. > >> > >> Only thing I've seen that uses XML (remember I'm a n00bie in Python, > >> Java, Jscript and HTML, so I don't see the real indepth stuff) is MSN > >> Messenger for it's logs. And MS IE can parse that XML. > >> > >> I've been curious as to how it's implemented. > >> > >> So yeah, if you want to share your experiences. > >> > >> Regards, > >> > >> Liam Clarke > > > > Well, I plan to use it as a data storage format for a university > > project (crowd simulation in a shopping center -- coded in Java). I > > hate binary data formats, and XML is a good unified way to store data > > as ASCII text, so I figured I'd use it. > > Also, XML files can be parsed without too much work, so I can write > > scripts that will manipulate my data files, in any language ("any" > > meaning "Python", there). > > > > As a bonus, I've decided to have a look at XSL, which allows me to > > format a XML file for display in a web browser. It entirely changed my > > perception of web programming. > > I intend to program an on-line browser-based game with some friends > > of mine later in the year (in Python of course -- I converted them), > > and now that I've seen what XML and XSL can do, we're so going to use > > them for data output: the data is in dynamically-generated XML, which > > links to a (static) XSL stylesheet to tell the browser how to render > > that data. > > Doing things that way has many advantages: > > 1) Data is separate from formatting. That's always a Good Thing(TM). > > If I someday decide that I don't like the way the site looks, I > > theoretically only need to recreate a stylesheet, without touching > > anything else. (boom! Instant skins!) > > 2) Most of the "HTML rendering" is going to be done by the user's > > browser. This, and the way XSL stylesheets are constructed will > > prevent many bad HTML issues. > > 3) For the same reason, it will save bandwidth. The XML data will > > probably take less space than the fully-formatted stuff I'd have to > > spit out with "regular" HTML, and the XSL stylesheet can probably be > > cached by the user's browser. > > 4) In the same line of reasoning, it'll also save CPU time: XML data, > > being smaller, is generated faster than the equivalent HTML. Granted, > > the stylesheet is another server request, but it's static, so it puts > > virtually no load on a server. > > > > -- Max > > maxnoel_fr at yahoo dot fr -- ICQ #85274019 > > "Look at you hacker... A pathetic creature of meat and bone, panting > > and sweating as you run through my corridors... How can you challenge > > a perfect, immortal machine?" > > > > > -- > maxnoel_fr at yahoo dot fr -- ICQ #85274019 > "Look at you hacker... A pathetic creature of meat and bone, panting > and sweating as you run through my corridors... How can you challenge a > perfect, immortal machine?" > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor