BIT320 Remix — XSQL

December 19, 2005

Would you like no ‘ or two ‘’ ?

Topics:

After reading Kevin’s post about Requirement 6, I checked out that SQL script he suggest.

It seems to be exactly what we’re looking for. However, when I tried to implement the script via the X-team, I ran into some syntax problems. In order to select a specific table, the script required that the table name be between apostrophes. However, the bind variable ? does not work when placed between apostrophes, ‘?’. Does anyone know how to get around this syntax error?

In Matt's Musings, 12/19/2005 | Original | Archive | Post to del.icio.us | Technorati

December 10, 2005

Problems with xsql:query

Topics:

Aga writes describing a problem with one of her XSQL pages. This is the page as orginally written:

<?xml version="1.0"?>

nnection="cis320" xmlns:xsql="urn:oracle-xsql">
<xsql:dml
bind-params="RETAILERNAME">
<!-- Everthing between the BEGIN and END key words is called a $
SELECT RETAILERNAME, ZIPCODE, STORESTREET, STORECITY, STORESTATS
FROM STORE
WHERE RETAILERNAME=?
</xsql:dml>
</page>

The big problem here is the use of the <xsql:dml> tag for a query. Just does not work. You need an <xsql:query> tag instead. Also, we have on occasion found problems using bind parameters for comparing text values. There’s an alternative way to do bind parameters that gets around that issue. Here’s a more fool proof rendition of Aga’s query with these two fixes:

<?xml version="1.0"?>

nnection="cis320" xmlns:xsql="urn:oracle-xsql">
<xsql:query>
<!-- Everthing between the BEGIN and END key words is called a $
SELECT RETAILERNAME, ZIPCODE, STORESTREET, STORECITY, STORESTATS
FROM STORE
WHERE RETAILERNAME='{@RETAILERNAME}'
</xsql:query>
</page>

Note that I took the bind parameter RETAILERNAME and just embedded it directly in the query with no bind-params attribute. The generic syntax for that is {@BindParameterName}. I surrounded it with single quotes here because it represents a text value. Other than this change in syntax, everything else applies.

In Blogonautic Solutions, 12/10/2005 | Original | Archive | Post to del.icio.us | Technorati

XSQL query statements: what’s wrong?

Topics:

I’m trying to write a query XSQL page instead of an input data one (for our project). I’ve tried many different combinations but I either get only the comments to show up like here or I get errors with invalid column name, character, etc. I know I’m probably missing something basic, but ; commit end and all those little commands don’t apply here (or at least I think so). Bud, if you could please let me know what I’m missing, I’d be especially grateful. You can also look at our jEdit file that resides on Kevin’s account under XSQL5/XSQL5TEST/insertStoreTEST3.xsql.

In Pink Footsie, 12/10/2005 | Original | Archive | Post to del.icio.us | Technorati

December 8, 2005

Alphabetizing Drop Down lists

Topics:

I’m not sure what exactly you want to do with the drop down (if you want to reorganize it a specific way) but if the drop down right now is pulled from a query (which ours is) it should be organized alphabetically. You can also fix this issue by the “order” command within the query on the XSQL page. To validate what I’m saying you can look at an answer to someone’s post on a forum. There are apparently other ways to do it inside the script with sort commands. Feel free to take a look.

In Pink Footsie, 12/08/2005 | Original | Archive | Post to del.icio.us | Technorati

December 5, 2005

AJAX vs. desktop development

Topics:

How AJAX and stand-alone software are similar

In del.icio.us/mridge, 12/05/2005 | Original | Archive

November 16, 2005

Templetes

Topics:

My understanding of templetes is as follows, correct me if I’m wrong.

1. a templete rule means when you see what is after the = do whatever comes before the = .

2. xsl:template match=”/” (inside <>) means match with top of document, which I think is in the root.xsl file. But I am not sure exactly what “match with top of document means”.

templete match=”customer_info” mode=”XSQLContents” (inside <>) means to match the customer_info in the query with that in the table (?) and the type of templete is XSQLContents.

de is just what type of rule the templete is.

5. “for each” means for everything below.

Is this right or am I missing something?

In Tigerlily's Blog, 11/16/2005 | Original | Archive | Post to del.icio.us | Technorati

Stylesheet

Topics:

what is a stylesheet? I glanced through the chapter we read for the first day of xsql and didn’t really find anything. I found this: The ‘< 'xsl:stylesheet'>‘ and ‘< 'xsl:transform'>‘ elements are completely synonymous elements. Both are used to define the root element of the style sheet” from one of the additional recource section on the syllabus that came with this example:

ylesheet version=\"1.0\"xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”‘>’.

I am confused. Is it like the xm; version=”1.0″? or are they different? Can someone please explain a stylesheet and how it differs from the example I just gave?



            
							


			

In Tigerlily's Blog, 11/16/2005 | Original | Archive | Post to del.icio.us | Technorati

On Your Own

Topics:

I was going through my notes from last week.  I tried looking at the query1 and query2 to figure out how to make query3 and query4 work.  I was wondering if anyone had figured it out yet.  I don’t see the “one word” that needs to be changed. Does anyone know what to do?

In Tigerlily's Blog, 11/16/2005 | Original | Archive | Post to del.icio.us | Technorati

November 7, 2005

W3Schools Online Web Tutorials

Topics:

Great source for learning about web technologies

In del.icio.us/mridge, 11/07/2005 | Original | Archive

Re: XSLT Query 3 example

Topics:

I apologize for, as Bud put it, not stating “the issue you are facing as precisely as you can.” In my post I did say that it was a possibility that I typed in the values wrong will running the file. This is why I asked for someone to tell me how they typed it when it worked so that I could try it, since I clearly was doing something wrong. Next time, I will try to make that more clear but it seemed clear to me when I typed it. And thanks Matt for helping me out.

In Tigerlily's Blog, 11/07/2005 | Original | Archive | Post to del.icio.us | Technorati

November 6, 2005

XSQL Query 3 example

Topics:

Matt and Lindsay had a discussion about “XSQL Query 3 example”. Lindsay could not get it to work, and Matt tried to help her debug. It worked for Matt. I tried it from Lindsay’s account, and it worked for me to with her file.

So, I’m not sure what the issue is. Generally, try to state the issue you are facing as precisely as you can, then we can help you better.

In Blogonautic Solutions, 11/06/2005 | Original | Archive | Post to del.icio.us | Technorati

Oh query where art thou?

Topics:

Tigerlily asks:

“I tried doing query 3 (query2.no_style.xsql) and I couldn’t get it to work. It worked as SQL and XSQL when I tried the original query but when I subsituted values it did nothing. All that happened was the prompt came up again. I am not sure if I did not type the substituting values wrong or what. Can someone tell me how the command should be typed?”

Without having you post what you typed, I can’t say for sure why it didn’t work. If you did type it right and it returned no results you would have seen just:
< ? xml version='1.0'?>
< customer_info/ >
Otherwise, to substitute values, you need to look at the query and see what column names the query was binding on. In this case it was “house_value” and “loan”. So to run the query with dynamically defined variables, it would look like this:

ery2.no_style.xsql house_value=’500000′ loan=’200000′

That query should produce all values with a house value over 500,000 and a load over 200,000. Hope that helps.

In Matt's Musings, 11/06/2005 | Original | Archive | Post to del.icio.us | Technorati

November 5, 2005

XSQL Query 3 example

Topics:

I was going through the slides from thursday’s class. I tried doing query 3 (query2.no_style.xsql) and I couldn’t get it to work. It worked as SQL and XSQL when I tried the original query but when I subsituted values it did nothing. All that happened was the prompt came up again. I am not sure if I did not type the substituting values wrong or what. Can someone tell me how the command should be typed?

In Tigerlily's Blog, 11/05/2005 | Original | Archive | Post to del.icio.us | Technorati

Name that space?

Topics:

More questions for the pros: what exactly are namespaces and URIs? I know what a URL is, are we talking about something alike? Again I’m taking this from O’Reilly’s Chapter 2. I know Bud said not to focus on them but I’m just kind of curious since I tried to get a better understanding of all the interrelationships. I guess I’m still a bit confused about the difference between XML and XSQL as well. Why are they not directly integrated? Thanks for all the input.

In Pink Footsie, 11/05/2005 | Original | Archive | Post to del.icio.us | Technorati

November 3, 2005

Bind Parameters

Topics:

Todays class seem to flow smoothly but as I look over my notes, I have one concern. That is the concept of bind parameters. We didn’t use bind params until we got into the more complex queries 2 & 3 on page 14 of the in-class notes which can be found here. So my question is, when is it appropriate to use bind params and what purpose does it actually serve. Thanks!!

In The Blogstar, 11/03/2005 | Original | Archive | Post to del.icio.us | Technorati