SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Design over xml data

    hi guys, iam a newbie to xml.
    We have this application written(by our client) in c++ and vb which needs to be internized.
    This application is now recoded(by our client) to get xml inputs, work on it, and spew out all results in xml.
    All inputs and outputs are communicated to the outside world using xml by this application server.

    The application server handels all data, authorization, users, etc etc, Basically it handels everything from A to Z.

    I just have to present the raw xml in a webpage with all bells and whistles, like images, forms, backgrounds, using css(xsl)

    etc.

    Basically build a site design where the xml data would sit. I also need form validation, sessions(i think i need to use php

    here), and other simple stuffs to be handeled.

    My question, is for the above sceanrio, what is the best way to design, should i use xml+xsl(iam newbie to either, but not

    averse to learning it) directly or use php(iam a novice in php). Any ideas and thoughts??

    thanx in advance for all replys
    Web Design Chennai
    Web Hosting Chennai
    Search Engine Optimization Chennai
    www.rhytha.com

  2. #2
    SitePoint Guru
    Join Date
    Dec 1999
    Location
    Southampton, Hants, UK
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    overall there are 2 ways of doing this:
    1. Parse/style the xml on the client side - this would involve just applying a stylesheet tag in the xml document (and maybe an XSLT to have more control over and hide elements)

    2. Parse/style the xml on the server - this would involve having a server side script that takes an XML document and an XSLT document, to create the formatting, and then maybe attaching a stylesheet to that. the server side script could be written in ASP/PHP/Java Servlets/JSP. - I've only ever done this in java servlets and I just wrote a class to take 2 strings (xml and xslt) and spew out another string (html). all very simple :-)

    The first way is the simpest but it may not work on all browsers etc.. (I wouldn't recommend this for an internet site, only for use on an intranet - where you may know people will only use IE 5+ to access it).

    The 2nd way is the most powerful, but requires some sort of server coding knowledge.

    check out www.w3schools.com - there are some great tutorials on using XML with XSLT.

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by daniel_eastley
    check out www.w3schools.com - there are some great tutorials on using XML with XSLT.
    I disagree. They are *awful* (for so many reasons)!

    This is the best I've found:
    http://www.topxml.com/xsl/tutorials/intro/default.asp
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps this is a discussion for another forum and thread, but why is W3Schools awful?

  5. #5
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by compuwhiz7
    Perhaps this is a discussion for another forum and thread, but why is W3Schools awful?
    The quality of the majority of their tutorials is pretty awful, and the design/usability of the site itself is bad, making it a poor site in my eyes.

    Furthermore, time and time again I see posts from people who are completely confused by the tutorials precisely because they are so badly put together.

    Surely the whole point of recommending a resource to a beginner is that it should be a well-structured, thought-out, clear, precise, and most importantly authoritative guide to whatever the topic is. None of the W3Schools tutorials that I have seen come anywhere near meeting these criteria, and hence I am constantly astonished that people like yourself recommend them.

    See my comments in this thread:
    http://www.sitepoint.com/forums/showthread.php?t=156802
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Makes a lot of sense. I myself haven't really used any of their tutorials (just glanced over in passing), but they do seem a little thin and sloppily cobbled together.


  7. #7
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    W3Schools has tried to be "all things to all men", and has IMHO failed completely - it is nothing to nobody!
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  8. #8
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bad combination.

  9. #9
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Hello RhyTha,

    If you haven't come to some conclusion yet of how you are going to handle this, I suggest #2 as it handles the poor support of XML on the client (browser) and I gather you are using PHP on the server?

    If so make sure that you have PHP_XSLT support in the PHP install you are dealing with. Most PHP 4.xx installations do not offer XSLT support.

    I also have to agree with the opinions about w3schools.... too bad but there are lots of articles about XML/XSLT to be sure!

    I wrote a PHP script some time ago to parse XML againsat XSLT and if you need it I'm sure I can dig it up.

    Cheers,
    Andrew
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  10. #10
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    all guys thank you for sharing your ideas with me.

    andrew i really appreciate if you could share that code with me.

    i have downloaded xml spy(learining version), its looks great, but iam too stupid to use any of the the tools in yet , i am learning using thier examples.

    is there any other simple easy to use xml editor and xslt editor?
    Web Design Chennai
    Web Hosting Chennai
    Search Engine Optimization Chennai
    www.rhytha.com

  11. #11
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Hi Rythia,

    I've been using an XML editor called cooktop for a little while www.xmlcooktop.com It's free and pretty easy to use. I found it less feature packed than XMLSpy but much easier to get a handle on.

    I've attached the php script I've been using to parse xml with xsl. It's set up to grab a dynamic xml source but works with a static xml file as well. I've had a hard time finding a unix/linux host that supports XSL on PHP so I've only been able to use it on my own Windows server for testing. They should point you in the right direction though.

    The processor.php file will print out the results. If this is not what you want to do change the last line echo $html; to do something else.

    Andrew
    Attached Files Attached Files
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  12. #12
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you andrew for the script and xmlcooktop.com refrence
    Web Design Chennai
    Web Hosting Chennai
    Search Engine Optimization Chennai
    www.rhytha.com

  13. #13
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    No worries

    Have fun. I think when you get it working you'll find XML is a pretty powerfull addition to your web dev tool box.

    See ya,
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •