Internet Development

Moderators: None (Apply to moderate this forum)
Number of threads: 1024
Number of posts: 1892

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: XML question - any experienced XML users? Posted by pbarbalias on 25 Oct 2004 at 8:03 AM
You should consider using XSLT files along with your XML files.

Remember:
XML is the data
XSLT is the template that will be used to PRESENT your data.

The xslt has a huge amount of functions including IF/Then/else logical checks and stuff..

PB

: This might not be the first place for this post but I was hoping somebody could help me with an XML question. I'm designing a set of functions that will parse out custom XML tags in an other-wise purely HTML file, and perform logic on them.
:
: One example that I'm trying to do is a way to use XML tags to perform conditional branching of the HTML in the form of if statements.
:
:

: <if condition="...">
: 	<p>Then display this</p>
: <else>
: 	<p>Dislpay this</p>
: </if>
: 

:
: My question is - is that valid XML? It doesn't look right, since else contains a child element but doesn't have a closing tag. I was thinking this might be XML compliant, but it's uglier:
:
:

: <if condition="...">
: 	<if_true>
: 		<p>Then display this</p>
: 	</if_true>
: 	<if_false>
: 		<p>Otherwise display this</p>
: 	</if_false>
: </if>
: 

:
: Anybody out there have input on what might be a good approach to this problem? Am I on the right track of is there an easier way? I'm open to suggestions. Thanks in advance.
:
: T
:

Thread Tree
tvienti XML question - any experienced XML users? on 5 Sept 2004 at 12:55 PM
pbarbalias Re: XML question - any experienced XML users? on 25 Oct 2004 at 8:03 AM
pbarbalias Re: XML question - any experienced XML users? on 23 Feb 2005 at 9:31 AM
pbarbalias Re: XML question - any experienced XML users? on 24 Feb 2005 at 4:51 PM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.