Don wrote:
>
> Nick
>
> I've been searching around like a dog after a lost bone for something to help explain to me the difference between XSLT and XForms. Why do both exist, and why would someone use one over the other. I have come up fairly dry on this topic, so I wondered if you might have seen some such comparison or explanation somewhere.
>
> Thanks for any input.
>
> Don
Don --
I don't know if anyone has ever talked about this, but I'll try to answer your question here:
The difference in XSLT and XForms is in what they're for. Extensible Stylesheet Language for Transformations (XSLT) is a language specifically designed to take XML of one form or structure and convert it into XML of another form or structure. (You can also use it to convert to and from non-XML, but that's another conversation.) There is a specific "vocabularly" for XSLT, and each element and attribute is focused on transforming a source document into a target document. XSLT deals with all kinds of information and doesn't really try to draw any meaning from it; it simply converts the source into the target.
XForms, on the other hand, is meant to provide an easy way to take information that starts out not as XML, but as data in a user's head. Think of it as HTML forms on steroids. It has a specific vocabulary, meant to be interpreted by an XForms client such as a browser. The client acts on the XForms elements directly, using them to render in some way form entry fields such as text boxes and pulldown menus. It then gathers the individual pieces of information and (in most cases) turns them into XML.
I've personally never seen too much of a collision between the two technologies, but I suppose I can see it if you look at them both as ways of taking information in one form and converting it to some other form. In reality, though, they serve very different purposes. XSLT is an almost abstract language that works directly on the data, where XForms is a concrete language acted upon by a client to help facilitate the actual collection of data.
I hope that helps...
---- Nick
I've decided it's time that I tried to make some money online. I've been building the backend systems that allow other people to do it for almost a decade, it's time I started.
So I've started reading up on current trends in Internet Marketing. One interesting piece I've found is a free ebook, 52 Secrets My Mom Never Told Me About Internet Marketing, by James Maduk. I'm still reading through it -- it's 300 pages, with hours of embedded video -- but it seems to provide some pretty valuable information. His new thing is to give away this book, and he's included an affiliate program -- hence this download of mine -- so I've decided to go ahead and post it. I'll also be periodically posting my feedback on what seems to work and what doesn't, so this should be interesting...
(BTW, in the interest of full disclosure, I should note that I have not yet purchased the subscription for the videos that are embedded. I plan to go through the text of the book first before deciding.)
Oh, if only everyone were this honest. Jon Stewart was on Crossfire and told it like it was. That shows like Crossfire are not really about debate.
And he called Tucker Carlson a dick.
I'm just to blasted tired to elaborate at the moment, so if you don't already know that I've written more tutorials for IBM than ... well ... just about anybody -- I think Doug Tidwell has edged me out, but that's about it -- you'll just have to take my word for it.
This weekend I gave a presentation at the Florida Association of Computer Users' Groups conference, which was quite enjoyable. I'll elaborate later, but for those of you looking for the link to that presentation I promised you, here it is.
More later...
And another one I mentioned at InformIT.com:
Not to be outdone, I guess, Amazon has just announced the release of Alexa Web Services. Alexa, as you may or may not know, is a service that crawls the web and collects information such as how popular a site is. (It's also the place to find the Wayback Machine, which shows you what sites looked like, oh, 8 years ago.)
The new service lets you request information about a site such as its popularity, language, file size, incoming and outgoing links, and so on, as well as listing links for a particular category.
Amazon has also announced the release of version 4.0 of their popular Amazon Web Services, now known as E-Commerce Service.
As I commented over at InformIT.com:
Ooooo, I'm excited about this one. Bloglines is a server-based RSS aggregator. In other words, you sign up for an account, and then you can "subscribe" to various feeds and see them all in one place, right there on the Bloglines site. Now they've released an API that lets developers pull subscription and item information for building clients and other apps.
Can't wait to play with this one...
Probably the most popular post chronicles my trouble with the shifter in my Saturn. Lots of people have read it, and specifically, lots of people have commented, leaving their suggestions, and linked to it as they have documented their own problems. My favorite is one I came across today, as a network admin fixes his car. Hehehehe...
Personally, I don't know what's going to happen with my poor little Saturn. Two months ago, I had to have $1000 work done on the transmission, so I had them replace the clutch, which probably only had another 10K miles in it. So of course, last month, the clutch hydraulics system, which has been slowly leaking for 4 years, finally went. (Another $335.)
And I still haven't replaced the radiator fan motor or the catalytic converter. I figure I can watch the temperature and just turn the heat on to cool the engine when it gets too hot. (Which is miserable here in Florida, but that's besides the point.) And the neighbors can live with the noise for a while.
I mean, just those two parts, if I had a professional do it, will bring the three month total to almost $2000.
On the other hand, she's my baby. I've gone more than 185,000 miles in that car, and she's always been good to me.
So right now I'm thinking that I'll keep it and give it to my son when I get a new car. Right now I'm looking at a used van with a tow package and wheelchair lift. With seven people in the house, and two of them in wheelchairs, I can sure use it. (Why used? It's the difference between $3,700 and $37,000.)
We'll see.
OK, here's something that's been holding me up for a little while. When you create an object in PHP and set it as a member of a second class, PHP actually creates a copy, rather than passing a reference to the original object. Any changes that you make to the original or to the copy do not get shared between them. To see that work, try running this script:
<?php
class Object1{
var $theObject;
function setObject($newObject){
$this->theObject = $newObject;
}
function getObject(){
return $this->theObject;
}
}
class Object2{
var $theValue;
function setValue($newValue){
$this->theValue = $newValue;
}
function getValue(){
return $this->theValue;
}
}
$object1 = new Object1;
$object2 = new Object2;
$object2->setValue("One");
$object1->setObject($object2);
$tempObject = $object1->getObject();
echo "Value of embedded object is "
echo $tempObject->getValue()."</p>";
$object2->setValue("Two");
echo "<p>Set value of object2 to "
echo $object2->getValue()."</p>";
$tempObject = object1->getObject();
echo "Value of embedded object is "
echo $tempObject->getValue()."</p>";
?>
You should see a result of:
Value of embedded object is One
Set value of object2 to Two
Value of embedded object is One
As a corrolary to that, that means that there's a difference between:
function setObjectValue($newValue){
$this->theObject->setValue($newValue);
}
and
function setObjectValue($newValue){
$tempobject = $this->theObject;
$tempobject->setValue($newValue);
}
Something to keep in mind.
[NOTE: In trying to figure something else out, I've run across a way to pass a variable by reference:
function myfunction(&$varname)
but that doesn't seem to help in this case.]
[NOTE on the NOTE: Problem solved by Jeffrey Taylor. Check out the comments for the solution.]