Tuesday, August 12, 2008

XQuery Tips and Tricks - Kurt Cagle - Nocturne

Discussion on oXygen vs. Stylus Studio. Appears to come down to price and responsiveness. Kurt also mentioned that if you are comfortable with the Stylus Studio interface then you are fine, but he likes the oXygen interface.

He's using eXist as the database. Reminds people that images and binaries are accessible from the database as well.

<Pizza Break - Thank You Anonymous Donor>

One of the coolest features: "You can store the XQueries themselves within the database."

GEEK OUT! He is using creation of characters for a D&D like game as the example....Chaotic Neutral Cleric for me!

Tip: declare function local:randchoose($ctermset as node()) as xs:string{
Defining the function as local allows you to keep that namespace private and have another namespace for the public output.

Tip: {$gender}
Embed Xquery in XML by using the {} operator.

Tip: string{$character/gender}
Remember that XPath returns element() and attribute() (and others) not text, unless specifically requested. Could easily cause problems that aren't immediately clear in a browser.

conf.xml in eXist:
setup - serielizer, scheduler, automatic XSL generation, indentation, XSLT transformer, validation mode, Xquery modules section...optional modules (turn them on -uncomment them)
then run the build routine.

Tip: in eXist -
  • util, and request modules are good to get to know.
  • transform allows the use of XSLT on XML in the XQuery. So use XQuery to collect the data and XSLT to transform it...easier recursion.
  • sql module allows you to get connections from just about anywhere with a URI
I'm not sure there was a lot of information for people using a dbase other than eXist or people who are pretty knowledgeable about XQuery. But it was pretty cool to watch him code in front of us. I like seeing people who do their jobs well, do their jobs well.

Evening Break

Well that day at Balisage went by quickly. I wonder why? The speakers were interesting and the topics were intriguing...perhaps time really does fly when one is having fun.

I had the chance to sit at lunch with several people who had bad trips to Montreal and several who had uneventful ones...but it appears that there is always someone with a worse flying story than I have...I guess I need to travel more.

I've just finished a Skype call with my wife and daughters and I will head out in search of a meal soon. It'll have to be a quick one because 7pm is both Kurt Cagle presenting on XQuery tips and tricks and the W3Québec user group. I was looking forward to the user group discussion but I will have to choose..and since XQuery is more likely to help pay the bills...

But I do wish I could hear about using XML in cool web sites. Hopefully someone else blogs about that session.

BTW, I noticed Simon St. Laurent taking pictures today. I hope he posts them soon to flickr.

Office Suite Markup: Is It Worthwhile

Patrick Durusau - Paper

He is the Editor of ODF....so I imagine he thinks it is worthwhile.

Open Office Allows:
  • We are interested in explicit semantics. But users just want to get things done.
  • Interchange
  • Application Independence
  • Long term preservation of content
Server pack 2 for Office 2007 will have native ODF support

Lots of argument with his conclusions that everyone making their own XML is a good thing. My computer crashed (damn Windows) so I am behind on the conversation. Liam and Tommie had some great back-n-forth with Patrick.

ODF tags are presentational? Patrick says they aren't all presentational but isn't specific about it. Sounds like most of the tags are presentational...which is not how I recall XML being used to its full potential.

Wendell: "What you left out is that these formats are REALLY ugly."

This talk brought up a lot of discussion but I think it can be mostly narrowed down to:
  1. How does this help me as an XML developer?
  2. Microsoft Office is pervasive...it is going to be difficult to get through that?

Optimized Cartesian product: A Hybrid approach to derivation-chain checking in XSD 1.1

Maurizio Casimirri - University of Bologna - Paper

Here comes the technical stuff. I'll try to keep up but check the paper if you are really interested.

XSD has no support for co-constraints (if some type of something then this situation)

XSD 1.1 has an xs:alternative element that allows for a test of the a node.

Basically he is describing how XSD 1.1 will determine the co-constraints based on the new elements.

Now he is describing how to used both the static and dynamic methods of detecting schema errors to form a hybrid method which might expose some errors that might not appear in the document instance.

Questions:
Murray Altheim - there's no way to go up the tree?
Response: Nope, it is specified to stay within parent.<at least I hope that is what they meant>

Note: multiple xs:alternative elements are processed in order. Thus an xs:alternative element that is blank (thereby default) would confirm the test and not allow any further elements to be processed.

I think this one stumped much of the audience. Wow, that makes me feel better.