OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   re: Re: `server parsed' XML?

[ Lists Home | Date Index | Thread Index ]
  • From: rev-bob@gotc.com
  • To: xml-dev@ic.ac.uk
  • Date: 09 Nov 99 06:32:54 -0500

> > What I want is to have a static xml file lying around, that has some sort
> > of token in it that represents, say, the current date.  In my program, as I
> > parse the xml file, I want to dynamically change that token into a string
> > representing the date.
> > 
> > That is, say I have a file foo.xml that contains in it:
> > 
> >    blah, blah, blah &date; blah, blah, blah
> > 
> > When I read it in on November 15, 1999, I want to get back
> > 
> >    blah, blah, blah November 15, 1999 blah, blah, blah
> 
> This is more or less how "interpolations" work in XML Script
> (www.xmlscript.org), although in this case you'd write:
> 
> blah, blah, blah #time()# blah, blah, blah
> 
> Then when this is processed by an XML Script processor everything between
> the hashes (in this case, the time() built-in command) is evaluated.

Here's another option, depending on what you have available to you.  I've had wonderful 
success using Inline's iHTML software (see their site at http://www.ihtml.com) to make 
a given document morph on the fly - and contrary to the name's implications, this will 
work just fine on XML documents if you configure it to do so.  (For instance, see 
http://www.gotc.com/index.xml - when you look at the source, you should see a few 
examples of dynamic processing at work.  Among the most obvious are that the slogan 
under the logo, the background image, the fake ad at the bottom of the page, and the 
warning/note just above the navigation bar are all set randomly from a list of options in a 
database - no client-side scripting required.  There's also a JavaScript routine that looks 
fairly pointless - fancy() is set up to simply return one number, with no indication of how 
that number was calculated.  Naturally, it was done on the server.)

I should note a few things at this point.  First, that GOTC page is still a work-in-progress, 
and if anyone has trouble seeing it with a functional XML browser, I'd like to know 
about it before I make that part of the site live.  Second, iHTML can be fairly expensive 
for an individual user, but once you get to a company level, that's not so bad.  (I'm lucky 
enough to use an ISP that has the Enterprise edition installed.)  Finally, iHTML code 
does not look well-formed; while this is not a functional problem, odds are it'll give a 
validation tool fits if you run the tool on the raw code instead of on what you get if you 
actually have iHTML parse the code first.



 Rev. Robert L. Hood  | http://rev-bob.gotc.com/
  Get Off The Cross!  | http://www.gotc.com/

Download NeoPlanet at http://www.neoplanet.com


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS