Going from Perl to XSL?
linderdm queries: "I am a perl web programmer who has taken a new job that requires me to do web 'programming' using XML, XSL, and Oracle XSQL. My minor experience with XSL so far has been horrible! It is so hard to do things that were very easy in Perl (looping!?!) and just seems incredibly verbose. I am curious to find out what the Slashdot community's experience has been with web programming in procedural languages (Perl, Java, etc) then switching to tag based XML/XSL. Am I wrong to be trying to do procedural programming with XSL?"
Right On!!! I'm so glad to see this right off the bat. Just because you don't know how to use a language doesn't mean it sucks. I have spent the last 2 years working on XML 'based' applications. The parser and the standards are what is so cool about it. The /. group should absolutely fall in love with this. It is open, and powerful, it's open, and open. What more could you want from a data storage standard?
Like the parent poster said, you don't program loops with XML or XSL, you use something like XPATH in conjunction with PERL to do that. I have to agree that Oracle's XML stuff is not the coolest in the world (or anywhere else for that matter), but don't knock XML. XML is your friend, and you need to learn how to use it before you bash it.
</soapbox> ha! "soap" </pun>
Let me make the above clearer: Say you have a document, with a root tag "collection", containing several "book" tags (I am too lazy to insert angle brackets here). XML Objectify will allow you for example to create an XO_Book class that will be automatically instantiated for each "book" tag in your document. It will also instantiate an XO_Collection class that you may also overload (or not).
For example, say that you want to have a method, file(), attached to each book. You can create that method (in Python), attach it to the XO_Book class and then run your XML file through XML Objectify. You will get back an object containing the root of the XML file and objects for each tag encountered within. If there are multiple tags, you get a magical iterator. So, my example above will look like this:
collection = xml_objectify.xml_objectify(myxmlfile)
for book in collection.book:
book.file()
Procedural and OOP power, while still talking to XML. Combine that with a good template engine (Cheetah for Python is very nice) and you will hit the ground running really fast w/o XSLT.