XQuery, the Server Language
An Xquery article by Kurt Cagle.
An Xquery article by Kurt Cagle.
I put a toggle inside a legend simply because it just popped in my head to try it. This same procedure could work with any type of grouped data without having a legend at all (see Switch/Case Toggle Template or Using Switch Case as a drop down box).
In my post Xforms: The Legendary Toggle
I use two cases with the Switch/Case method to get the effect I wanted–inside the cases are two triggers each with an xforms-toggle–one trigger hides while the other is visible, and vice versa.
However, one doesn’t need a switch/case at all but can rely on “relevance” to get the same effect, without as much coding, and by only using one, instead of two, triggers. Credit for this approach goes to the xforms administrator at xforms.org.
(more…)
Anyone who has followed my blog knows that I use php to parse my xml data by simply putting my data into an indexed array or an associative array and then manipulating the data as you would any other arrayed data (see http://clarkepeters.wordpress.com/2007/09/02/parsing-without-the-dom-or-simplexml-in-php/. I’m not advocating, however, that this is the best method for dealing with xml–it’s not. The DOM or SimpleXml or other parser’s are designed specifically to handle xml. For anyone who has the time and inclination, learn how to parse with an xml parser. That is especially important when your handling files from sources that are not your own.
One thing you will notice, however, is that as you become more versed in xforms, you’ll find less and less need to rely on the DOM for data manipulation. (more…)
Powered by WordPress – Hosted by <ixwebhosting.com>