Author Archive for rae

jquery

I’m still new to jquery, so I haven’t had the opportunity to make god use of it. It’s a library for all the javascript commands. They say it best on their website:

jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.

if you happen to check it out let me know what you think of it…

XSL scrolling through the months

We added code today to scroll through the months. Here’s what it breaks down to:

<xsl:if test="/__ROOT__/_get/month >= 1">

The above means if the value of the month is greater than or equal to 1 (January)

<xsl:value-of select="//link_prefix"/>reports-simple-cash-flow&amp;month=<xsl:if test="//_get/month &lt;= 10">0</xsl:if>

This is to fix a glitch that gives the software a problem scrolling from 09 September -10 October

<xsl:value-of select="/__ROOT__/_get/month - 1"/>

Causes the arrow to decrease the month by 1

  <xsl:if test="not(/__ROOT__/_get/month >= 1)"><img src="{//path_prefix}/images/buttons/out_d.gif"/></xsl:if></td>

This line tell is if the month is January (month 01) do not allow the user to continue to scroll.

root, node, and tree




When using xpath you can direct the program to go to certain files with the back slash. A “//” means go to the root of the files and search one by one from there. It’s like sending someone the long way around because you don’t want them to get lost. A “/” a the beginning sends the program to the root node on the tree - kind of like a filesystem. This is a more specific means of routing the user where they want to be, and takes less time than the former option.

More XSLT Tinkering

General XSL Notes

In Xpath the @ sign is used to select an attribute.

The [ ] are used to specify a node in a subset. Like a key they unlock a door, but they only unlock one door or a specific subset of doors.

The * is the master key if you will. Opening any doors, though I’m not entirely sure how to use that using a practical application.

XPath Notes

I’ve been looking at Xpath all afternoon and it’s becoming readable, well at least one specific phrase makes sense:



The above statement tells the xpath for every value in the following location: __ROOT__/i18n/labels/label[key=’variable’] display that value. Currently I’m replacing all the text in Pbooks (our open source accounting software) with xsl, so that later we can make it possible to translate it into other languages.

Tinkering with XSL




I return to the XSL it’s slow going for me, but things are beginning to take on a solid form. The meanings of the different XSL elements, are beginning to become logical rather than a mish mosh of information. The two that began to take on the most shape today were For-each and Value-of.

For-each tells the document to loop through each item in a specific node

Value-of tells the document to grab a specific element, and input it into the document

Zvon.org gives some decent starter tutorials.

Oh the things you can Do

Well Javascript once again proves itself to be a fun and handy tool in creating original and interactive websites. Walter Zorn

I’m going to try this out in the sandbox it allows you to resize and move specified elements all over the screen. ‘m not entirely sure what the practical application is for something like this, but it sure is fun. Check out the sandbox to see if I could get it to work.

Wow I just got it to work, most excellent. It was a little confusing at first, but the directions he gives are good enough to get you where you’re going.

I haven’t quite figured out how to make the resize function work, but soon as I do I’ll let you know. For now check out the sandbox it’s looking good.