Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Re: XML To HTML, easy transformation idea

Thread Tools

Re: XML To HTML, easy transformation idea

Berislav Lopac
Posts: n/a
Theodore H. Smith wrote:
> Hi people,
> I'm thinking of writing a cross platform XML transformation tool. It
> will let people input a bunch of XML files, and output a bunch of HTML
> files, or even other XML files, or files in other languages too (where
> possible). The output will be totally standardised, because it will
> use a template to generate the output.
> I've used a precursor to this idea of mine, at the website
> It's a very nice technical ref if I
> do say so myself! I've used it for other ideas of mine now, and I'll
> be using it for more in the future, too.
> The advantage over XML:Fo is that it will be *easy* ) The template
> will be written in the same language that the output is in. Heres an
> example of this language:
> <!--#if [IsCat]-->
> <p>It's a cat called <!--[PetName]--></p>
> <!--#elseif [IsDog]-->
> <P>It's a dog, called <!--[PetName]--></P>
> <!--#endif-->
> This basically is just HTML, with processing instructions embedded.
> It will optionally use XPath, to locate the data from the XML.
> Is there something like this already? I guess this makes it a little
> like PHP?? I didn't model it over PHP, as I've only picked up rare
> snippets about what PHP is about, and never used it. Besides, I'm sure
> mine is easier to use.
> Basically, it lets me write my HTML like I like to write my HTML, or
> even write it with a graphical editor. Then I insert the processing
> instruction comments, and I can load the data from the XML.
> I get the best of both. Structured input, and and graphically edited
> output. I may write more of my website like this....

Ever heard of XSLT?

a) It uses XML syntax, which is more or less the same language as in
b) It uses Xpath to locate XML data.
c) There are numerous tools that help you design it graphically.
d) It is already widely accepted, both in server-side tools as in browsers
(IE and Mozilla both).

Your solution doesn't use "the same language", because -- although embedded
in HTML comments -- your processing instructions must have a sytax different
from HTML.


Berislav Lopac
Web developer

Reply With Quote

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML to another XML format transformation using XSLT Binaryx XML 3 04-14-2012 10:20 PM
XSLT Transformation (relatively easy, I think) ? XML 1 02-14-2007 08:46 AM
questions and recommend books about refactoring of xml-schematas and the transformation of xml-documents HL XML 2 10-20-2006 04:41 PM
no tags in my xml-to-xml transformation, help.... yannicklaclau XML 2 02-28-2005 03:44 PM
XML to XML Transformation Will XML 8 11-07-2003 05:05 PM